:root {
  /* Sheet / chrome — white glass */
  --abb-sheet-bg: #f5f5f7;
  --abb-sheet-surface: rgba(255, 255, 255, 0.88);
  --abb-sheet-glass: rgba(255, 255, 255, 0.72);
  --abb-sheet-border: rgba(0, 0, 0, 0.08);
  --abb-sheet-text: #1d1d1f;
  --abb-sheet-muted: #6e6e73;
  --abb-sheet-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

  /* Legacy aliases for cards */
  --abb-bg: #f5f5f7;
  --abb-bg2: #ffffff;
  --abb-glow: #0d9488;
  --abb-glow-soft: rgba(13, 148, 136, 0.2);
  --abb-text: #1d1d1f;
  --abb-muted: #6e6e73;
  --abb-border: rgba(0, 0, 0, 0.08);
  --abb-accent: #00FFE0;
  --abb-accent-dark: #0d9488;

  /* Bubbles — KEEP Afroboosts brand */
  --abb-user: linear-gradient(135deg, #1d4ed8, #2563eb);
  --abb-ai-bg: #ffffff;
  --abb-ai-text: #1d1d1f;
  --abb-ai-border: rgba(0, 0, 0, 0.06);
}

/* ── AfroBoosts AI Orb Launcher ─────────────────────────────────────────── */

#abbBackdrop {
  position: fixed;
  inset: 0;
  z-index: 999980;
  background: rgba(5, 8, 18, 0.45);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, backdrop-filter 0.45s ease, visibility 0.45s ease;
}
#abbBackdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#abbLauncher {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#abbLauncher.abb-launcher-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#abbLauncher.abb-launcher-drift {
  transition: transform 0.8s ease-in-out;
}

.abb-particles {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  overflow: visible;
}
.abb-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 255, 224, 0.55);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.45);
  animation: abb-particle-float 4s ease-in-out infinite;
  opacity: 0.7;
}
.abb-particle:nth-child(2) { animation-delay: -1.2s; background: rgba(167, 139, 250, 0.6); }
.abb-particle:nth-child(3) { animation-delay: -2.4s; width: 2px; height: 2px; }
.abb-particle:nth-child(4) { animation-delay: -0.8s; left: 70%; top: 20%; }
.abb-particle:nth-child(5) { animation-delay: -3.1s; left: 10%; top: 60%; }
.abb-particle:nth-child(6) { animation-delay: -1.8s; left: 80%; top: 75%; width: 2px; height: 2px; }

@keyframes abb-particle-float {
  0%, 100% { transform: translate(0, 0); opacity: 0.35; }
  50% { transform: translate(4px, -8px); opacity: 0.85; }
}

#abbAttentionBar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  margin-right: 0;
  padding: 0;
  height: 48px;
  border-radius: 999px;
  background: rgba(11, 14, 26, 0.72);
  border: 1px solid rgba(0, 255, 224, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 255, 224, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: max-width 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, margin-right 0.4s ease, padding 0.4s ease;
}
#abbAttentionBar.show {
  max-width: min(320px, calc(100vw - 100px));
  opacity: 1;
  pointer-events: auto;
  margin-right: 10px;
  padding: 0 14px 0 16px;
  cursor: pointer;
}
#abbAttentionBar.welcome {
  max-width: min(360px, calc(100vw - 90px));
  white-space: normal;
  height: auto;
  min-height: 48px;
  padding: 12px 14px 12px 16px;
  flex-wrap: wrap;
}
#abbAttentionBar.welcome .abb-attention-text {
  white-space: normal;
  line-height: 1.35;
  font-size: 13px;
}
.abb-attention-text {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
}
.abb-attention-text.fade { opacity: 0; }
.abb-attention-sparkle {
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease 0.15s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6));
}
#abbAttentionBar.show .abb-attention-sparkle {
  opacity: 1;
  transform: scale(1);
}
.abb-attention-dismiss {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, color 0.2s ease;
  pointer-events: none;
}
#abbAttentionBar.show .abb-attention-dismiss {
  opacity: 1;
  pointer-events: auto;
}
.abb-attention-dismiss:hover {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
}
.abb-welcome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4ed8, #0d9488);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.abb-welcome-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(29, 78, 216, 0.45); }

/* Floating orb — dark glass + cyan glow */
#abbFab {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 224, 0.35);
  background: linear-gradient(145deg, rgba(11, 14, 26, 0.95), rgba(16, 22, 34, 0.92));
  color: #0B0E1A;
  font-size: 0;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 32px rgba(0, 255, 224, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  overflow: visible;
  animation: abb-orb-breathe 3.5s ease-in-out infinite;
}
#abbFab:hover { transform: scale(1.06); }
#abbFab.abb-orb-jump { animation: abb-orb-jump 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
#abbFab.abb-orb-fly { animation: none; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
#abbFab.abb-orb-thinking { animation: abb-orb-think 1.2s ease-in-out infinite; }
#abbFab.abb-orb-notify { animation: abb-orb-notify 0.8s ease-in-out 3; }

.abb-orb-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 224, 0.22) 0%, transparent 70%);
  pointer-events: none;
  animation: abb-glow-pulse 3.5s ease-in-out infinite;
}
.abb-orb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 255, 224, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}
.abb-orb-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #00FFE0);
  border: 2px solid rgba(11, 14, 26, 0.9);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.7);
  z-index: 2;
}
.abb-orb-thinking-dots {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 3px;
  z-index: 2;
}
#abbFab.abb-orb-thinking .abb-orb-thinking-dots { display: flex; }
.abb-orb-thinking-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 255, 224, 0.8);
  animation: abb-think-dot 1s ease-in-out infinite;
}
.abb-orb-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.abb-orb-thinking-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes abb-orb-breathe {
  0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 28px rgba(0, 255, 224, 0.15); }
  50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 40px rgba(0, 255, 224, 0.28); }
}
@keyframes abb-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes abb-orb-jump {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-10px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes abb-orb-think {
  0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 32px rgba(0, 255, 224, 0.2); }
  50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 48px rgba(167, 139, 250, 0.35); }
}
@keyframes abb-orb-notify {
  0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 32px rgba(0, 255, 224, 0.2); }
  50% { box-shadow: 0 8px 36px rgba(0, 0, 0, 0.5), 0 0 56px rgba(167, 139, 250, 0.55); }
}
@keyframes abb-think-dot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* Hide launcher while chat is open */
#abbLauncher.abb-launcher-chat-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Floating panel — bottom sheet entrance; internal sheet unchanged */
#abbPanel {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  z-index: 999991;
  width: min(480px, 100vw);
  height: min(85dvh, 720px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px));
  background: #ffffff;
  border: 1px solid var(--abb-sheet-border);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.18), 0 28px 72px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  touch-action: manipulation;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  contain: layout style paint;
  visibility: hidden;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, visibility 0.35s ease;
}
#abbPanel.open {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#abbPanel.abb-panel-opening {
  visibility: visible;
  opacity: 1;
}
#abbPanel.abb-panel-closing {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(100%);
}

.abb-head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(13, 148, 136, 0.25);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease 0.2s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
#abbPanel.open .abb-head-avatar {
  opacity: 1;
  transform: scale(1);
}
.abb-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.abb-head-titles { min-width: 0; }

/* Legacy FAB hidden class — kept for JS compat */
#abbFab.abb-fab-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.88);
}

body.abb-chat-open {
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}
html.abb-chat-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.abb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,252,0.95));
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.abb-head strong { color: var(--abb-sheet-text); font-size: 15px; font-weight: 650; }
.abb-head-sub { display: block; font-size: 11px; color: var(--abb-sheet-muted); margin-top: 2px; }
.abb-fullchat { color: var(--abb-accent-dark); font-size: 12px; font-weight: 600; text-decoration: none; }
.abb-close {
  background: #f5f5f7;
  border: none;
  color: var(--abb-sheet-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abb-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--abb-sheet-bg);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.abb-msg-wrap { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.abb-msg-wrap.customer { align-items: flex-end; }

/* Messenger-style AI row with avatar */
.abb-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
  align-self: flex-start;
}
.abb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(13, 148, 136, 0.22);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  background: #fff;
}
.abb-msg-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.abb-msg-content .abb-bubble.ai { align-self: flex-start; max-width: 100%; }
.abb-msg-content .abb-cards,
.abb-msg-content .abb-actions { margin-top: 0; }

.abb-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.48;
  white-space: pre-wrap;
  word-break: break-word;
}
.abb-bubble.customer {
  align-self: flex-end;
  background: var(--abb-user);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.abb-bubble.ai {
  align-self: flex-start;
  background: var(--abb-ai-bg);
  color: var(--abb-ai-text);
  border: 1px solid var(--abb-ai-border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.abb-typing {
  align-self: flex-start;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--abb-ai-border);
  border-radius: 18px;
  display: none;
  margin: 0 12px 8px;
  flex-shrink: 0;
}
.abb-typing-row {
  display: none;
  align-items: flex-end;
  gap: 8px;
  margin: 0 12px 8px;
  align-self: flex-start;
}
.abb-typing-row .abb-typing {
  margin: 0;
}
.abb-typing-row .abb-typing.show { display: flex; }
.abb-typing.show { display: flex; gap: 4px; }
.abb-typing span {
  width: 7px; height: 7px;
  background: var(--abb-accent-dark);
  border-radius: 50%;
  animation: abbDot 1.2s infinite;
}
.abb-typing span:nth-child(2) { animation-delay: 0.2s; }
.abb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes abbDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.abb-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.abb-card {
  background: #ffffff;
  border: 1px solid var(--abb-sheet-border);
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.abb-card-title { font-weight: 600; color: var(--abb-sheet-text); margin-bottom: 4px; }
.abb-card-meta { color: var(--abb-sheet-muted); font-size: 12px; }
.abb-card-btn {
  margin-top: 8px;
  display: inline-block;
  padding: 8px 14px;
  background: var(--abb-accent-dark);
  color: #fff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.abb-card-payment { border-color: rgba(29, 78, 216, 0.35); }
.abb-card-payment .abb-card-amount { font-size: 22px; font-weight: 700; color: #1d4ed8; margin: 8px 0; }
.abb-card-deposit-rich .abb-card-hero {
  font-size: 32px;
  font-weight: 800;
  color: #1d4ed8;
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
}
.abb-card-field {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}
.abb-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--abb-sheet-muted);
  margin-bottom: 4px;
}
.abb-field-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--abb-sheet-text);
  word-break: break-all;
  margin-bottom: 8px;
}
.abb-copy-primary {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
.abb-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.abb-card-btn-primary {
  background: var(--abb-accent-dark) !important;
  color: #fff !important;
  text-align: center;
  width: 100%;
}
.abb-card-btn-secondary {
  background: #f5f5f7 !important;
  color: var(--abb-accent-dark) !important;
  border: 1px solid rgba(13, 148, 136, 0.25) !important;
  text-align: center;
  width: 100%;
}
.abb-pay-btn { display: block; text-align: center; margin-top: 12px; }
.abb-card-wallet { border-color: rgba(16, 185, 129, 0.35); }
.abb-card-order { border-color: rgba(59, 130, 246, 0.35); }
.abb-card-deposit { border-color: rgba(245, 158, 11, 0.45); }
.abb-card-waiting { border-color: rgba(168, 85, 247, 0.4); }
.abb-card-success { border-color: rgba(16, 185, 129, 0.55); background: rgba(16, 185, 129, 0.06); }
.abb-card-summary { border-color: rgba(99, 102, 241, 0.45); }
.abb-card-recommend { border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.04); }
.abb-link-preview { word-break: break-all; font-size: 11px; opacity: 0.85; }
.abb-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
  font-size: 13px;
}
.abb-card-row span { color: var(--abb-sheet-muted); min-width: 60px; }
.abb-copy-btn {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--abb-glow-soft);
  background: transparent;
  color: var(--abb-accent-dark);
  font-size: 11px;
  cursor: pointer;
}
.abb-steps { margin: 8px 0 0 16px; padding: 0; font-size: 12px; color: var(--abb-sheet-muted); }
.abb-steps li { margin-bottom: 4px; }
.abb-pulse { animation: abbPulse 2s ease-in-out infinite; color: var(--abb-accent-dark); }
@keyframes abbPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.abb-upload-wrap { padding: 8px 12px; background: #fff; flex-shrink: 0; border-top: 1px solid var(--abb-sheet-border); }
.abb-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed var(--abb-glow-soft);
  color: var(--abb-accent-dark);
  font-size: 12px;
  cursor: pointer;
}
.abb-upload-prominent {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px dashed var(--abb-accent-dark);
  background: #f0fdfa;
  color: var(--abb-accent-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.abb-upload-prominent:hover { background: #ccfbf1; }
.abb-card-tips, .abb-card-why {
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
}
.abb-card-why { border-left-color: var(--abb-accent-dark); background: #f0fdfa; }
.abb-tips-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--abb-sheet-muted); }
.abb-tips-list li { margin-bottom: 4px; }
.abb-card-progress { border-left: 3px solid var(--abb-accent-dark); }
.abb-progress-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  margin: 10px 0 6px;
  overflow: hidden;
}
.abb-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--abb-accent-dark), #14b8a6);
  transition: width 0.4s ease;
}
.abb-status-badge.partial { background: #fef3c7; color: #b45309; }

.abb-typing-status {
  font-size: 13px;
  color: var(--abb-accent-dark);
  margin-bottom: 6px;
  font-weight: 500;
  animation: abbFadeIn 0.3s ease;
}
@keyframes abbFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.abb-sticky-actions {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-top: 1px solid var(--abb-sheet-border);
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.abb-sticky-btn {
  flex: 1 1 auto;
  min-width: 72px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  background: #fff;
  color: var(--abb-accent-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.abb-sticky-btn:active { transform: scale(0.97); background: #f0fdfa; }

.abb-alt-tiers { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.abb-alt-tier {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--abb-sheet-border);
}
.abb-tier-desc { font-size: 13px; color: var(--abb-sheet-muted); margin: 4px 0 8px; }

.abb-action-btn { min-height: 40px; padding: 10px 16px; font-size: 14px; }
.abb-card-btn { min-height: 44px; font-size: 14px; }
.abb-form button, .abb-page-form button { min-height: 48px; min-width: 72px; }
.abb-form input, .abb-page-form input { min-height: 48px; font-size: 16px; }

.abb-card { animation: abbCardIn 0.35s ease; }
@keyframes abbCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.abb-progress-bar { height: 12px; border-radius: 6px; }
.abb-card-deposit-rich { padding: 16px; }
.abb-card-hero { font-size: 28px; font-weight: 700; margin: 8px 0; }

.abb-card-service { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.abb-card-name { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--abb-sheet-text); }
.abb-card-price-hero {
  font-size: 26px;
  font-weight: 800;
  color: var(--abb-accent-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.abb-price-unit { font-size: 14px; font-weight: 600; opacity: 0.75; }
.abb-card-meta-sub { font-size: 12px; opacity: 0.85; }

.abb-md-list { margin: 6px 0 6px 18px; padding: 0; }
.abb-md-list li { margin-bottom: 4px; }
.abb-md-ol-item { margin: 4px 0; }
.abb-md-num { font-weight: 700; color: var(--abb-accent-dark); }
.abb-bubble strong { font-weight: 700; }
.abb-bubble em { font-style: italic; opacity: 0.95; }
.abb-refill { color: #059669; font-weight: 600; }
.abb-shortfall { color: #d97706 !important; font-weight: 600; }

.abb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.abb-action-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: #fff;
  color: var(--abb-accent-dark);
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}
.abb-action-btn:hover { background: rgba(13, 148, 136, 0.08); }

.abb-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.abb-form .abb-attach-btn {
  width: 40px;
  height: 40px;
  font-size: 24px;
}
.abb-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--abb-sheet-border);
  background: #f5f5f7;
  color: var(--abb-sheet-text);
  font-size: 16px;
}
.abb-form input[type="text"]:focus { outline: none; border-color: var(--abb-accent-dark); background: #fff; }
.abb-form button[type="submit"],
.abb-form .abb-send-btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: var(--abb-accent-dark);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 44px;
  touch-action: manipulation;
}

/* Full-page chat — white glass sheet */
.abb-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #ffffff 0%, var(--abb-sheet-bg) 55%, #ececf0 100%);
  color: var(--abb-sheet-text);
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
}

.abb-page-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--abb-sheet-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--abb-sheet-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.abb-page-header a { color: var(--abb-accent-dark); text-decoration: none; font-size: 14px; font-weight: 600; }
.abb-page-header h1 { font-size: 18px; margin: 0; flex: 1; color: var(--abb-sheet-text); font-weight: 650; }

.abb-page-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  width: calc(100% - 24px);
  margin: 16px auto 24px;
  background: var(--abb-sheet-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--abb-sheet-border);
  border-radius: 24px;
  box-shadow: var(--abb-sheet-shadow);
  overflow: hidden;
  min-height: calc(100vh - 120px);
}

.abb-page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.abb-page-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  background: var(--abb-sheet-bg);
}

.abb-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--abb-sheet-border);
  background: #ffffff;
}

/* ── Premium AI compose bar (full page + widget) ── */
.abb-compose-dock {
  flex-shrink: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: none;
  background: transparent;
  position: relative;
  z-index: 2;
}

.abb-compose-dock::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 120% at 20% 100%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 100% at 85% 100%, rgba(45, 212, 191, 0.1), transparent 50%);
  pointer-events: none;
}

.abb-compose-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 100%;
}

.abb-compose-avatar-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  animation: abbAvatarFloat 4s ease-in-out infinite;
}

.abb-compose-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.15),
    0 8px 24px rgba(99, 102, 241, 0.22),
    0 4px 12px rgba(15, 23, 42, 0.12);
  background: #fff;
}

.abb-compose-pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(99, 102, 241, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: box-shadow 0.25s ease, background 0.25s ease;
  animation: abbPillGlow 5s ease-in-out infinite;
}

.abb-compose-pill:focus-within {
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 12px 40px rgba(99, 102, 241, 0.14),
    0 4px 16px rgba(45, 212, 191, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.abb-compose-plus {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-left: 2px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.25s ease, transform 0.25s ease;
}

.abb-compose-plus:hover {
  color: #6366f1;
  transform: scale(1.08);
}

.abb-compose-plus:active {
  transform: scale(0.95);
}

.abb-compose-preview {
  position: relative;
  flex-shrink: 0;
  max-width: 56px;
}

.abb-compose-preview img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.abb-compose-preview-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.abb-compose-input,
.abb-compose-pill input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--abb-sheet-text);
  outline: none;
}

.abb-compose-input::placeholder,
.abb-compose-pill input[type="text"]::placeholder {
  color: #9aa0a6;
  font-weight: 400;
}

.abb-compose-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #3b82f6 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.45),
    0 0 24px rgba(139, 92, 246, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.abb-compose-send:hover {
  transform: scale(1.05);
  box-shadow:
    0 6px 24px rgba(99, 102, 241, 0.55),
    0 0 32px rgba(139, 92, 246, 0.35);
  animation: abbSendPulse 1.5s ease-in-out infinite;
}

.abb-compose-send:active {
  transform: scale(0.96);
}

.abb-compose-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  animation: none;
}

.abb-send-sparkle {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

@keyframes abbAvatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes abbPillGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(99, 102, 241, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
  50% { box-shadow: 0 10px 36px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95); }
}

@keyframes abbSendPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45), 0 0 24px rgba(139, 92, 246, 0.25); }
  50% { box-shadow: 0 6px 28px rgba(99, 102, 241, 0.65), 0 0 40px rgba(139, 92, 246, 0.4); }
}

.abb-upload-status {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}
.abb-upload-label {
  display: block;
  margin-bottom: 4px;
}
.abb-upload-bar-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  margin: 4px 0;
}
.abb-upload-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transition: width 0.2s ease;
}
.abb-upload-pct {
  display: block;
  font-size: 11px;
  opacity: 0.85;
}

.abb-msg-wrap.customer.is-uploading .abb-bubble {
  position: relative;
}
.abb-upload-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.25);
  border-radius: 12px;
}
.abb-upload-spinner::after {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: abbSpin 0.8s linear infinite;
}
@keyframes abbSpin {
  to { transform: rotate(360deg); }
}

.abb-customer-attach-img {
  display: block;
  max-width: min(240px, 100%);
  border-radius: 12px;
  margin-bottom: 4px;
}

.abb-bubble.customer .abb-attach-caption {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 4px;
}

/* Widget panel compose — same premium bar */
#abbPanel .abb-compose-dock {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

#abbPanel .abb-compose-avatar-wrap {
  width: 44px;
  height: 44px;
}

#abbPanel .abb-compose-avatar {
  width: 44px;
  height: 44px;
}

#abbPanel .abb-compose-input,
#abbPanel .abb-compose-pill input[type="text"] {
  font-size: 16px;
  padding: 10px 6px;
}

#abbPanel .abb-compose-send {
  width: 40px;
  height: 40px;
}

.abb-attach-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--abb-accent-dark);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.abb-attach-icon {
  display: block;
  width: 18px;
  height: 18px;
  position: relative;
}
.abb-attach-icon::before,
.abb-attach-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}
.abb-attach-icon::before {
  width: 18px;
  height: 2px;
  top: 8px;
  left: 0;
}
.abb-attach-icon::after {
  width: 2px;
  height: 18px;
  top: 0;
  left: 8px;
}
.abb-attach-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
}
.abb-attach-btn:active { transform: scale(0.92); }
.abb-attach-btn.abb-attach-pulse {
  animation: abbAttachPulse 1.8s ease-in-out infinite;
  border-color: rgba(13, 148, 136, 0.45);
  background: rgba(204, 251, 241, 0.75);
}
.abb-compose-plus.abb-attach-pulse {
  animation: abbAttachPulse 1.8s ease-in-out infinite;
  color: #0d9488;
}
.abb-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 0;
  background: transparent;
}
.abb-attach-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  max-width: 100%;
}
.abb-attach-card.is-uploading { opacity: 0.85; }
.abb-attach-card.is-done { border-color: rgba(13, 148, 136, 0.35); }
.abb-attach-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.abb-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.abb-attach-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.abb-attach-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.abb-attach-status {
  font-size: 12px;
  color: #64748b;
}
.abb-attach-card.is-done .abb-attach-status { color: #0d9488; font-weight: 600; }
.abb-attach-remove {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.abb-attach-remove:hover { background: rgba(15, 23, 42, 0.12); color: #0f172a; }
.abb-customer-attach-img {
  display: block;
  max-width: min(240px, 100%);
  border-radius: 10px;
  margin-bottom: 6px;
}
.abb-attach-caption {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}
.abb-bubble.customer .abb-attach-caption { color: rgba(255, 255, 255, 0.9); }
.abb-typing-status {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  padding-left: 2px;
}
@keyframes abbAttachPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(13, 148, 136, 0); }
}
.abb-page-form input[type="text"] {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--abb-sheet-border);
  background: #f5f5f7;
  color: var(--abb-sheet-text);
  font-size: 16px;
}
.abb-page-form input[type="text"]:focus { outline: none; border-color: var(--abb-accent-dark); background: #fff; }
.abb-page-form .abb-send-btn,
.abb-page-form button[type="submit"] {
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  background: var(--abb-accent-dark);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.abb-page-form button:hover { background: #0f766e; }

.abb-page .abb-typing {
  margin: 0 16px 8px;
}
.abb-page .abb-typing-row {
  margin: 0 16px 8px;
}

.abb-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.abb-status-badge.pending { background: #fef3c7; color: #b45309; }
.abb-status-badge.processing { background: #dbeafe; color: #1d4ed8; }
.abb-status-badge.completed { background: #d1fae5; color: #047857; }
.abb-status-badge.cancelled { background: #fee2e2; color: #b91c1c; }

@media (max-width: 480px) {
  #abbPanel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: none;
    left: 0;
    transform: translateY(100%);
  }
  #abbPanel.open,
  #abbPanel.abb-panel-opening {
    transform: translateY(0);
  }
  #abbPanel.abb-panel-closing {
    transform: translateY(100%);
  }
  #abbLauncher {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    right: calc(14px + env(safe-area-inset-right, 0px));
  }
  #abbLauncher.abb-launcher-left {
    left: calc(14px + env(safe-area-inset-left, 0px));
    right: auto;
  }
  #abbAttentionBar.show {
    max-width: min(280px, calc(100vw - 88px));
  }
  .abb-page-sheet { width: 100%; margin: 0; border-radius: 0; border: none; min-height: calc(100dvh - 56px); }
}

/* Dashboard: AI sits left where WhatsApp used to be */
#abbLauncher.abb-launcher-left {
  left: calc(18px + env(safe-area-inset-left, 0px));
  right: auto;
  flex-direction: row-reverse;
}
#abbLauncher.abb-launcher-left #abbAttentionBar.show {
  margin-right: 0;
  margin-left: 10px;
}
@media (max-width: 768px) {
  #abbLauncher.abb-launcher-left {
    left: calc(14px + env(safe-area-inset-left, 0px));
    right: auto;
  }
}

/* Lift AI above fixed bottom nav + sticky order bar */
body:has(.app-bottom-nav) #abbLauncher {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
body:has(.dashboard-order-sticky) #abbLauncher {
  bottom: calc(132px + env(safe-area-inset-bottom, 0px));
}

/* Orders page: keep table action buttons clear */
body:has(.orders-page-wrap) {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
body:has(.orders-page-wrap) #abbLauncher {
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

/* WhatsApp float is on the LEFT; AI orb stays on the RIGHT — no overlap stacking needed */
