/* ============================================================
   BabyPlus POS — Dashboard Demo UI/UX (Desktop + Mobile)
   Scoped to #tab-dashboard only. Keeps all original IDs.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0');

#tab-dashboard {
  font-family: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #1e293b;
  background: #f8fafc;
  padding: 0 0 32px;
  max-width: 1680px;
  margin: 0 auto;
}

#tab-dashboard .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
#tab-dashboard .material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---------- Welcome Banner (demo style) ---------- */
#tab-dashboard .bpd-welcome {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border-radius: 16px;
  padding: 20px 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
}
#tab-dashboard .bpd-welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(99,102,241,0.25), transparent 50%);
  pointer-events: none;
}
#tab-dashboard .bpd-welcome-left h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
#tab-dashboard .bpd-welcome-left p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}
#tab-dashboard .bpd-welcome-status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 8px 14px;
  backdrop-filter: blur(8px);
  z-index: 1;
}
#tab-dashboard .bpd-welcome-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: bpd-pulse 2s ease infinite;
}
@keyframes bpd-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.5; }
}
#tab-dashboard .bpd-welcome-status .wtitle {
  font-size: 12px; font-weight: 700; color: #e2e8f0;
}
#tab-dashboard .bpd-welcome-status .wsub {
  font-size: 10px; color: #94a3b8;
}
#tab-dashboard .bpd-welcome-status .wtime {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 600; color: #a5b4fc;
  margin-left: 6px;
}

/* ---------- KPI Metric Cards (5 cards like demo) ---------- */
#tab-dashboard .bpd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
#tab-dashboard .bpd-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
#tab-dashboard .bpd-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.09);
}
#tab-dashboard .bpd-kpi .kpi-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
#tab-dashboard .bpd-kpi .kpi-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
  line-height: 1.3;
}
#tab-dashboard .bpd-kpi .kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.2;
}
#tab-dashboard .bpd-kpi .kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}
#tab-dashboard .bpd-kpi.g-blue { border-color: #bfdbfe; background: linear-gradient(135deg,#fff 0%,#f2f7ff 100%); }
#tab-dashboard .bpd-kpi.g-blue .kpi-icon { background: #dbeafe; color: #2563eb; }
#tab-dashboard .bpd-kpi.g-purple { border-color: #ddd6fe; background: linear-gradient(135deg,#fff 0%,#f7f3ff 100%); }
#tab-dashboard .bpd-kpi.g-purple .kpi-icon { background: #ede9fe; color: #7c3aed; }
#tab-dashboard .bpd-kpi.g-green { border-color: #a7f3d0; background: linear-gradient(135deg,#fff 0%,#effdf8 100%); }
#tab-dashboard .bpd-kpi.g-green .kpi-icon { background: #d1fae5; color: #059669; }
#tab-dashboard .bpd-kpi.g-amber { border-color: #fde68a; background: linear-gradient(135deg,#fff 0%,#fffbeb 100%); }
#tab-dashboard .bpd-kpi.g-amber .kpi-icon { background: #fef3c7; color: #d97706; }
#tab-dashboard .bpd-kpi.g-pink { border-color: #fecdd3; background: linear-gradient(135deg,#fff 0%,#fff3f5 100%); }
#tab-dashboard .bpd-kpi.g-pink .kpi-icon { background: #ffe4e6; color: #e11d48; }

/* ---------- Section Cards ---------- */
#tab-dashboard .bpd-card {
  background: #fff;
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  margin-bottom: 16px;
}
#tab-dashboard .bpd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
#tab-dashboard .bpd-card-head h2 {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
#tab-dashboard .bpd-card-head h2 .head-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
#tab-dashboard .bpd-card-head .see-all {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
}
#tab-dashboard .bpd-card-head .see-all:hover { color: #1d4ed8; }

/* Chart + Low Stock grid */
#tab-dashboard .bpd-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}
#tab-dashboard .bpd-card.chart-card {
  background: linear-gradient(125deg, #fff 0%, #f5f8ff 100%);
}
#tab-dashboard .bpd-card.stock-card {
  background: linear-gradient(125deg, #fff 0%, #fff7f8 100%);
  border-color: rgba(254,205,211,0.7);
}
#tab-dashboard .bpd-card.stock-card .head-icon {
  background: #fff1f2; color: #e11d48;
}
#tab-dashboard .bpd-card.chart-card .head-icon {
  background: #eff6ff; color: #2563eb;
}

/* Low stock items */
#tab-dashboard #lowStockList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#tab-dashboard #lowStockList .ls-item,
#tab-dashboard #lowStockList > div {
  background: rgba(255,241,242,0.5);
  border: 1px solid #ffe4e6;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}
#tab-dashboard #lowStockList .ls-item:hover,
#tab-dashboard #lowStockList > div:hover {
  background: #fff1f2;
}

/* Recent Orders table */
#tab-dashboard .bpd-card.orders-card .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#tab-dashboard .recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
#tab-dashboard .recent-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
#tab-dashboard .recent-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #f8fafc;
  color: #334155;
  vertical-align: middle;
}
#tab-dashboard .recent-table tbody tr:hover {
  background: #f8fafc;
}
#tab-dashboard .recent-table .empty-hint {
  text-align: center;
  color: #94a3b8;
  padding: 24px !important;
}

/* Pending Notify */
#tab-dashboard #pendingNotifyCard {
  border-color: rgba(167,243,208,0.6);
  background: linear-gradient(125deg, #fff 0%, #f0fdfa 100%);
}
#tab-dashboard #pendingNotifyCard .head-icon {
  background: #ecfdf5; color: #059669;
}
#tab-dashboard #pendingNotifyList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#tab-dashboard .section-note {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Sync Log Terminal (dark like demo) */
#tab-dashboard .bpd-card.sync-card {
  background: #0f172a;
  border-color: #1e293b;
  color: #e2e8f0;
}
#tab-dashboard .bpd-card.sync-card .bpd-card-head {
  border-bottom-color: rgba(30,41,59,0.8);
}
#tab-dashboard .bpd-card.sync-card h2 {
  color: #e2e8f0;
}
#tab-dashboard .bpd-card.sync-card .head-icon {
  background: rgba(16,185,129,0.15); color: #34d399;
}
#tab-dashboard .bpd-card.sync-card .btn-ghost {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 6px;
}
#tab-dashboard .bpd-card.sync-card .btn-ghost:hover {
  color: #fff;
  background: #334155;
}
#tab-dashboard #syncLogsHost,
#tab-dashboard .log-container {
  background: rgba(2,6,23,0.6);
  border: 1px solid rgba(30,41,59,0.8);
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #94a3b8;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 1100px) {
  #tab-dashboard .bpd-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  #tab-dashboard {
    padding: 0 0 24px;
  }
  #tab-dashboard .bpd-welcome {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 14px;
  }
  #tab-dashboard .bpd-welcome-left h2 {
    font-size: 1.1rem;
  }
  #tab-dashboard .bpd-welcome-status {
    width: 100%;
    justify-content: space-between;
  }
  #tab-dashboard .bpd-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  #tab-dashboard .bpd-kpi {
    padding: 12px 14px;
    border-radius: 12px;
  }
  #tab-dashboard .bpd-kpi .kpi-val {
    font-size: 1.15rem;
  }
  #tab-dashboard .bpd-kpi .kpi-lbl {
    font-size: 10px;
  }
  #tab-dashboard .bpd-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #tab-dashboard .bpd-card {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 12px;
  }
  #tab-dashboard .bpd-card-head h2 {
    font-size: 12px;
  }
}
@media (max-width: 420px) {
  #tab-dashboard .bpd-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  #tab-dashboard .bpd-kpi.g-pink {
    grid-column: span 2;
  }
}

/* ============================================================
   Top Header Bar — Demo / Screenshot style (no images)
   ============================================================ */
.bpd-topbar,
.topheader.bpd-topbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.9);
  padding: 10px 20px !important;
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex-wrap: wrap;
}
.bpd-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  max-width: 520px;
}
.bpd-search-wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
  max-width: 320px;
}
.bpd-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.bpd-search-input {
  width: 100%;
  padding: 7px 52px 7px 36px;
  font-size: 12px;
  font-family: inherit;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}
.bpd-search-input:hover { background: #f1f5f9; }
.bpd-search-input:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.bpd-search-input::placeholder { color: #94a3b8; }
.bpd-search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  color: #94a3b8;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
}
.bpd-date-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .bpd-date-pill { display: flex; }
}
.bpd-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.bpd-online-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(236,253,245,0.9);
  border: 1px solid rgba(167,243,208,0.8);
  font-size: 11px;
  font-weight: 500;
  color: #065f46;
}
.bpd-online-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}
.bpd-online-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #10b981;
}
.bpd-online-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  opacity: 0.75;
  animation: bpd-ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes bpd-ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.bpd-online-text { font-weight: 600; }
.bpd-online-sep { color: #6ee7b7; }
.bpd-online-time {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #64748b;
}
.bpd-refresh-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.bpd-refresh-btn:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.bpd-refresh-btn:hover svg {
  animation: bpd-spin 0.6s linear;
}
@keyframes bpd-spin {
  to { transform: rotate(180deg); }
}
.bpd-topbar-divider {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
}
.bpd-dev-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}
@media (min-width: 1280px) {
  .bpd-dev-badge { display: flex; }
}
.bpd-dev-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bpd-dev-name {
  font-weight: 600;
  color: #334155;
  font-size: 12px;
}
.bpd-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
}
.bpd-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  ring: 2px solid #f1f5f9;
  box-shadow: 0 0 0 2px #f1f5f9;
  flex-shrink: 0;
}
.bpd-user-info {
  display: none;
  text-align: left;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .bpd-user-info { display: block; }
}
.bpd-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}
.bpd-user-role {
  font-size: 10px;
  font-weight: 600;
  color: #2563eb;
}
.bpd-logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.bpd-logout-btn:hover {
  color: #e11d48;
  background: #fff1f2;
  border-color: #fecdd3;
}
.bpd-logout-btn span {
  display: none;
}
@media (min-width: 768px) {
  .bpd-logout-btn span { display: inline; }
}

/* Light Welcome Banner (demo desktop style) */
#tab-dashboard .bpd-welcome {
  background: #fff !important;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 16px;
  padding: 20px 24px;
  color: #0f172a !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
#tab-dashboard .bpd-welcome::before {
  display: none;
}
#tab-dashboard .bpd-welcome-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
#tab-dashboard .bpd-welcome-title-row h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: #0f172a;
}
#tab-dashboard .bpd-wave { font-size: 1.25rem; }
#tab-dashboard .bpd-shift-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
#tab-dashboard .bpd-welcome-left p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
#tab-dashboard .bpd-welcome-mascot {
  font-size: 2rem;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Mobile topbar adjustments */
@media (max-width: 768px) {
  .bpd-topbar,
  .topheader.bpd-topbar {
    padding: 8px 12px !important;
    gap: 8px;
  }
  .bpd-topbar-left {
    max-width: none;
    flex: 1 1 100%;
    order: 1;
  }
  .bpd-search-wrap {
    max-width: none;
  }
  .bpd-date-pill { display: none !important; }
  .bpd-topbar-right {
    order: 0;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }
  .bpd-online-badge {
    font-size: 10px;
    padding: 4px 8px;
  }
  .bpd-dev-badge { display: none !important; }
  #tab-dashboard .bpd-welcome {
    padding: 14px 16px;
    border-radius: 14px;
  }
  #tab-dashboard .bpd-welcome-title-row h2 {
    font-size: 1.05rem;
  }
}


/* Hide floating WhatsApp / quick-order FAB (user uses external app) */
.bp-io-fab,
#bpIoFab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ============================================================
   Fix: single search (global-search #bpGS) + clean topbar layout
   ============================================================ */
.topheader.bpd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
/* Mobile: keep topheader hidden unless user opens search/profile */
@media (max-width: 900px) {
  #appScreen .topheader.bpd-topbar {
    display: none !important;
  }
  #appScreen .topheader.bpd-topbar.bp-open {
    display: flex !important;
    flex-wrap: wrap;
    margin: 8px 12px 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 10px 12px !important;
    background: #fff !important;
  }
}
.topheader.bpd-topbar > #bpGS {
  flex: 1 1 auto;
  min-width: 180px;
  max-width: 360px;
  order: 0;
  margin: 0;
}
.topheader.bpd-topbar .bpd-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  order: 1;
  max-width: none;
}
.topheader.bpd-topbar .bpd-topbar-right {
  order: 2;
  margin-left: auto;
}
/* Hide any leftover duplicate search UI */
.topheader .bpd-search-wrap {
  display: none !important;
}

/* Welcome banner: dark capsule on mobile (demo style), light on desktop */
#tab-dashboard .bpd-welcome {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%) !important;
  border: none !important;
  border-radius: 16px;
  padding: 16px 18px;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
}
#tab-dashboard .bpd-welcome::before {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  filter: blur(30px);
  display: block;
}
#tab-dashboard .bpd-welcome-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 500;
  color: #bfdbfe;
  margin-bottom: 6px;
}
#tab-dashboard .bpd-welcome-left h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #fff !important;
  letter-spacing: -0.02em;
}
#tab-dashboard .bpd-welcome-left p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.85) !important;
}
#tab-dashboard .bpd-welcome-mascot {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
#tab-dashboard .bpd-wave { color: #bfdbfe; }
#tab-dashboard .bpd-shift-badge { display: none; }

/* Desktop: keep welcome a bit softer but still dark capsule is fine */
@media (min-width: 901px) {
  #tab-dashboard .bpd-welcome {
    padding: 18px 22px;
  }
  #tab-dashboard .bpd-welcome-left h2 {
    font-size: 1.25rem;
  }
}

/* Mobile: if pickup section exists above, tighten spacing */
@media (max-width: 900px) {
  #tab-dashboard .bpd-welcome {
    margin-top: 4px;
    margin-bottom: 12px;
    border-radius: 14px;
    padding: 14px 16px;
  }
  /* Hide date pill on mobile topbar (mobile header has its own) */
  .topheader.bpd-topbar .bpd-date-pill {
    display: none !important;
  }
}

/* ============================================================
   Mobile Header v2 — Demo style (like screenshot 2)
   ============================================================ */
@media (max-width: 900px) {
  .bp-mheader-v2 {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226,232,240,0.7);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    padding: 10px 14px 8px !important;
    position: sticky;
    top: 0;
    z-index: 700;
  }
  .bp-mh-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .bp-mheader-v2 .bp-mh-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }
  .bp-mh-logo-box {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #4f46e5, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
    flex-shrink: 0;
  }
  .bp-mh-text { min-width: 0; }
  .bp-mh-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .bp-mh-name {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.1;
  }
  .bp-mh-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid rgba(16,185,129,0.25);
  }
  .bp-mh-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    animation: bpd-pulse 2s ease infinite;
  }
  .bp-mh-sub {
    margin: 2px 0 0;
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
  }
  .bp-mh-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .bp-mh-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .bp-mh-icon-btn.bp-mh-bell {
    background: #f1f5f9;
    color: #475569;
  }
  .bp-mh-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bp-mheader-v2 .bp-mh-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #0f172a, #334155);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 2px #fff;
  }
  .bp-mh-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 6px;
    flex-wrap: wrap;
  }
  .bp-mh-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
  }
  .bp-mh-dev {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    font-size: 11px;
    font-weight: 600;
    color: #065f46;
  }
  .bp-mh-dev i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
  }
  .bp-mh-logout {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #e11d48;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
  }
  .bp-mh-logout svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Welcome capsule polish */
  #tab-dashboard .bpd-welcome {
    margin: 12px 0 14px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(115deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%) !important;
    position: relative;
    overflow: hidden;
  }
  #tab-dashboard .bpd-welcome-glow {
    position: absolute;
    right: -24px;
    bottom: -24px;
    width: 110px;
    height: 110px;
    background: rgba(59,130,246,0.22);
    border-radius: 50%;
    filter: blur(28px);
    pointer-events: none;
  }
  #tab-dashboard .bpd-welcome-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 500;
    color: #bfdbfe;
    margin-bottom: 8px;
  }
  #tab-dashboard .bpd-dot { color: #64748b; }
  #tab-dashboard .bpd-welcome-time { color: #6ee7b7; font-family: 'JetBrains Mono', monospace; font-size: 10px; }
  #tab-dashboard .bpd-welcome-left h2 {
    font-size: 19px !important;
    font-weight: 700;
    color: #fff !important;
    margin: 0;
    line-height: 1.25;
  }
  #tab-dashboard .bpd-welcome-left p {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(203,213,225,0.9) !important;
  }
  #tab-dashboard .bpd-welcome-mascot {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
    z-index: 1;
  }
}

/* ============================================================
   Welcome banner — LEFT aligned (not centered) desktop + mobile
   ============================================================ */
#tab-dashboard .bpd-welcome,
#tab-dashboard #bpdWelcomeBanner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important;
  padding: 18px 22px !important;
  min-height: auto !important;
}
#tab-dashboard .bpd-welcome-left {
  flex: 1 1 auto !important;
  text-align: left !important;
  margin: 0 !important;
  max-width: none !important;
  position: relative;
  z-index: 1;
}
#tab-dashboard .bpd-welcome-left h2,
#tab-dashboard .bpd-welcome-left p,
#tab-dashboard .bpd-welcome-meta {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#tab-dashboard .bpd-welcome-meta {
  display: inline-flex !important;
  width: auto !important;
}
#tab-dashboard .bpd-welcome-mascot {
  flex-shrink: 0 !important;
  margin-left: 16px !important;
  margin-right: 0 !important;
  position: relative;
  z-index: 1;
}
/* Desktop: don't center the whole block */
@media (min-width: 901px) {
  #tab-dashboard .bpd-welcome {
    width: 100% !important;
  }
  #tab-dashboard .bpd-welcome-left h2 {
    font-size: 1.25rem !important;
  }
}
