:root {
  --bg-deep: #060e20;
  --bg-main: #09152e;
  --bg-surface: #0e1e40;
  --bg-elevated: #142854;
  --bg-card: rgba(16, 33, 69, 0.88);
  --bg-input: #0a1733;
  --bubble-out: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --bubble-out-text: #ffffff;
  --bubble-in: #12244b;
  --bubble-in-text: #f1f5f9;
  --primary: #2563eb;
  --primary-bright: #3b82f6;
  --primary-glow: rgba(37, 99, 235, 0.45);
  --accent-ice: #93c5fd;
  --accent-cyan: #38bdf8;
  --border: rgba(147, 197, 253, 0.14);
  --border-strong: rgba(96, 165, 250, 0.32);
  --text-main: #f8fafc;
  --text-sec: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-lg: 0 22px 60px rgba(2, 6, 23, 0.65);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  --bg-deep: #e8effa;
  --bg-main: #f3f7fd;
  --bg-surface: #ffffff;
  --bg-elevated: #eaf1fc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-input: #eff4fc;
  --bubble-out: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --bubble-out-text: #ffffff;
  --bubble-in: #ffffff;
  --bubble-in-text: #0f172a;
  --primary: #1d4ed8;
  --primary-bright: #2563eb;
  --primary-glow: rgba(29, 78, 216, 0.28);
  --accent-ice: #1d4ed8;
  --accent-cyan: #0284c7;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(37, 99, 235, 0.28);
  --text-main: #0b1730;
  --text-sec: #475569;
  --text-muted: #64748b;
  --shadow-lg: 0 20px 50px rgba(15, 35, 75, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.42;
  user-select: none;
}

input, textarea, select, .msg-bubble {
  user-select: text;
}

button, input, textarea, select {
  font-family: inherit;
}

/* Desktop Showcase Top Bar (automatically hidden inside Android APK!) */
.web-hub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 46px;
  padding: 0 16px;
  background: linear-gradient(90deg, #050c1c 0%, #0d2149 55%, #071229 100%);
  border-bottom: 1px solid rgba(147, 197, 253, 0.18);
  color: #f8fafc;
  font-size: 13px;
  z-index: 60;
}

body.is-native-apk .web-hub-bar {
  display: none !important;
}

.hub-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hub-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #bfdbfe;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}

.hub-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(15, 32, 68, 0.85);
  color: #e2e8f0;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.hub-btn:hover {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.35);
}

.hub-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(191, 219, 254, 0.4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.hub-btn.active-split {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}

/* Workspace Root Wrapper (supports split view with Operator Desk on wide screens!) */
.workspace-stage {
  display: flex;
  width: 100%;
  height: calc(100% - 46px);
  position: relative;
}

body.is-native-apk .workspace-stage {
  height: 100%;
}

.app-root {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow: hidden;
}

.operator-split-pane {
  width: 47%;
  min-width: 400px;
  height: 100%;
  border-left: 2px solid var(--border-strong);
  background: #060e20;
  display: none;
  flex-direction: column;
}

.operator-split-pane.visible {
  display: flex;
}

.operator-split-pane iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 900px) {
  .web-hub-bar .hide-sm { display: none; }
  .operator-split-pane.visible {
    position: fixed;
    inset: 46px 0 0 0;
    width: 100%;
    min-width: 0;
    z-index: 80;
  }
}

/* Push Notification Banner (SMS OTP & Live Messages) */
.push-toast-stack {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 430px);
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.push-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(9, 21, 46, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(96, 165, 250, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(18px);
  cursor: pointer;
  animation: slideDownPush 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDownPush {
  from { opacity: 0; transform: translateY(-22px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.push-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
}

.push-body {
  flex: 1;
  min-width: 0;
}

.push-title {
  font-size: 13px;
  font-weight: 700;
  color: #bfdbfe;
}

.push-text {
  font-size: 13.5px;
  color: #f8fafc;
  margin-top: 1px;
}

.push-action-pill {
  padding: 6px 11px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ================= AUTH / REGISTRATION SCREEN ================= */
.auth-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  background: radial-gradient(circle at 22% 16%, #183a82 0%, #09152e 52%, #050c1b 100%);
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(12, 26, 56, 0.88);
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  color: #f8fafc;
}

.auth-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo-img {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.5);
  margin-bottom: 12px;
}

.auth-brand-title {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 15%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand-sub {
  font-size: 13.5px;
  color: #94a3b8;
  margin-top: 4px;
  max-width: 320px;
}

.invite-banner {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: #dbeafe;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.phone-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.country-select {
  width: 112px;
  padding: 13px 10px;
  border-radius: 14px;
  background: rgba(7, 16, 35, 0.9);
  border: 1px solid rgba(147, 197, 253, 0.24);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.text-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card .text-input {
  background: rgba(7, 16, 35, 0.9);
  color: #f8fafc;
  border-color: rgba(147, 197, 253, 0.24);
}

.text-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.otp-input {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 12px;
  padding: 14px;
}

.btn-main {
  width: 100%;
  padding: 14px 18px;
  border-radius: 15px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, opacity 0.15s;
}

.btn-main:active {
  transform: scale(0.985);
}

.btn-main:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-soft {
  padding: 11px 15px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.auth-footer-links {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(147, 197, 253, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
}

.link-btn {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* ================= MAIN MESSENGER SHELL ================= */
.messenger-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.sidebar-pane {
  width: 380px;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  padding-top: var(--safe-top);
}

.chat-pane {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
  padding-top: var(--safe-top);
}

@media (max-width: 780px) {
  .sidebar-pane {
    width: 100%;
  }
  .chat-pane {
    position: absolute;
    inset: 0;
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .chat-pane.mobile-open {
    transform: translateX(0);
  }
}

/* Top Header in Sidebar */
.sidebar-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-row img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sync-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.sync-dot.local {
  background: #38bdf8;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
}

.search-box-wrap {
  padding: 0 16px 10px;
}

.search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 92px;
}

/* Chat & Contact List Items */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.14s;
  margin-bottom: 3px;
  position: relative;
}

.list-item:hover {
  background: var(--bg-elevated);
}

.list-item.active {
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.avatar-circle.concierge {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 55%, #38bdf8 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.42);
}

.online-badge {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-surface);
}

.item-body {
  flex: 1;
  min-width: 0;
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.item-title {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.verified-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent-cyan);
  font-size: 10px;
  font-weight: 800;
}

.item-time {
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
}

.item-preview {
  font-size: 13.5px;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-pill {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary-bright);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Bottom Navigation Bar */
.bottom-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  z-index: 15;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
  position: relative;
}

.tab-btn.active {
  color: var(--primary-bright);
}

.tab-badge {
  position: absolute;
  top: 2px;
  right: 22%;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= CHAT CONVERSATION PANE ================= */
.empty-chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  color: var(--text-sec);
}

.chat-header {
  height: 62px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.mobile-back-btn {
  display: none;
}

@media (max-width: 780px) {
  .mobile-back-btn {
    display: inline-flex;
  }
}

.chat-header-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.chat-header-title {
  font-weight: 700;
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-status {
  font-size: 12px;
  color: var(--accent-ice);
}

.messages-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-image: radial-gradient(rgba(96, 165, 250, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
}

.msg-row {
  display: flex;
  flex-direction: column;
  max-width: min(82%, 520px);
}

.msg-row.out {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-row.in {
  align-self: flex-start;
  align-items: flex-start;
}

.msg-row.system {
  align-self: center;
  max-width: 90%;
}

.system-pill {
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(30, 58, 138, 0.35);
  border: 1px solid var(--border);
  color: var(--accent-ice);
  font-size: 12px;
  text-align: center;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  position: relative;
  word-break: break-word;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.msg-row.out .msg-bubble {
  background: var(--bubble-out);
  color: var(--bubble-out-text);
  border-bottom-right-radius: 5px;
}

.msg-row.in .msg-bubble {
  background: var(--bubble-in);
  color: var(--bubble-in-text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}

.msg-sender-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 3px;
}

.reply-quote-box {
  padding: 6px 9px;
  border-left: 3px solid #93c5fd;
  background: rgba(15, 23, 42, 0.28);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  opacity: 0.78;
  margin-top: 4px;
}

.reactions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.reaction-chip {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  cursor: pointer;
}

/* Structured Ticket Card & Operator Commercial Offer Card inside Chat */
.rich-ticket-card {
  min-width: 265px;
  background: rgba(8, 19, 44, 0.55);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 14px;
  padding: 12px;
  margin-top: 4px;
}

.rich-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.18);
}

.rich-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 3px 0;
}

.rich-row span:first-child {
  opacity: 0.75;
}

.rich-row span:last-child {
  font-weight: 600;
  text-align: right;
}

.rich-estimate-box {
  margin-top: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(147, 197, 253, 0.35);
}

/* Composer Bar */
.reply-draft-bar {
  padding: 8px 14px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.composer-bar {
  padding: 9px 12px calc(9px + var(--safe-bottom));
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer-input {
  flex: 1;
  max-height: 120px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 15px;
  resize: none;
  outline: none;
}

.send-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* ================= FLOATING CONCIERGE ASSISTANT (FAB + POPUP SHEET) ================= */
.concierge-fab {
  position: fixed;
  right: 18px;
  bottom: calc(74px + var(--safe-bottom));
  z-index: 90;
  height: 56px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.55);
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #0284c7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(29, 78, 216, 0.62), 0 0 0 4px rgba(37, 99, 235, 0.18);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
}

.concierge-fab:hover {
  transform: translateY(-2px) scale(1.02);
}

.concierge-fab:active {
  transform: scale(0.96);
}

.concierge-fab.in-chat-offset {
  bottom: calc(76px + var(--safe-bottom));
}

.fab-star-orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-label-wrap {
  text-align: left;
  line-height: 1.15;
}

.fab-label-top {
  font-size: 13.5px;
  font-weight: 800;
}

.fab-label-sub {
  font-size: 10.5px;
  color: #dbeafe;
  opacity: 0.92;
}

.fab-unread-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  border: 2px solid #09152e;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Popup Concierge Drawer / Sheet */
.concierge-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(3, 8, 20, 0.66);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
}

.concierge-backdrop.open {
  display: flex;
}

.concierge-sheet {
  width: min(460px, 100%);
  height: min(86vh, 720px);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popConcierge 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 600px) {
  .concierge-backdrop {
    padding: 0;
  }
  .concierge-sheet {
    width: 100%;
    height: 92vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

@keyframes popConcierge {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.concierge-top {
  padding: 15px 18px 12px;
  background: linear-gradient(135deg, #0d2149 0%, #173679 100%);
  color: #fff;
  border-bottom: 1px solid rgba(147, 197, 253, 0.22);
}

.concierge-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.operator-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
}

.concierge-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}

.c-tab {
  padding: 8px 6px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-sec);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.c-tab.active {
  background: var(--primary);
  color: #fff;
}

.concierge-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.service-card {
  padding: 14px 13px;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
  color: var(--text-main);
}

.service-card:hover {
  border-color: var(--primary-bright);
  transform: translateY(-1px);
}

.service-card.wide {
  grid-column: span 2;
}

.svc-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 9px;
}

.svc-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

.svc-sub {
  font-size: 11.5px;
  color: var(--text-sec);
  line-height: 1.35;
}

/* Wizard Form Elements */
.wizard-form-group {
  margin-bottom: 12px;
}

.chip-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice-chip {
  padding: 7px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.choice-chip.selected {
  background: var(--primary);
  border-color: #93c5fd;
  color: #fff;
}

.calc-preview-banner {
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.26), rgba(2, 132, 199, 0.2));
  border: 1px solid var(--border-strong);
  margin: 8px 0 14px;
}

.calc-val {
  font-size: 21px;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-top: 2px;
}

/* Generic Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(3, 8, 20, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  width: min(430px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.qr-preview-frame {
  width: 176px;
  height: 176px;
  margin: 12px auto;
  padding: 10px;
  background: #ffffff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-preview-frame img {
  width: 100%;
  height: 100%;
}
