/* RM Support WhatsApp Inbox — Authentic WhatsApp Redesign Demo */
:root {
  --wa-header: #008069;
  --wa-header-dark: #006a57;
  --wa-green: #25D366;
  --wa-teal: #00A884;
  --wa-teal-soft: #e7fce8;
  --wa-out: #D9FDD3;
  --wa-in: #FFFFFF;
  --wa-wallpaper: #EFEAE2;
  --wa-bg: #F0F2F5;
  --wa-panel: #FFFFFF;
  --wa-border: #E9EDEF;
  --wa-ink: #111B21;
  --wa-muted: #667781;
  --wa-tick-blue: #53BDEB;
  --wa-red: #D93025;
  --wa-red-bg: #FCE8E6;
  --wa-amber: #C57600;
  --wa-amber-bg: #FEF3C7;
  --wa-green-ink: #0F7B43;
  --wa-green-bg: #E6F8ED;
  --wa-blue: #1A73E8;
  --wa-blue-bg: #E8F0FE;
  --wa-purple: #7C3AED;
  --wa-purple-bg: #F3E8FF;
  --shadow-sm: 0 1px 2px rgba(17, 27, 33, 0.08);
  --shadow-md: 0 4px 16px rgba(17, 27, 33, 0.12);
  --shadow-lg: 0 12px 32px rgba(17, 27, 33, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--wa-ink);
  background: var(--wa-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--wa-teal);
  outline-offset: 2px;
}

/* Top Demo Preview Ribbon */
.demo-ribbon {
  height: 32px;
  background: #0B141A;
  color: #E9EDEF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11.5px;
  gap: 8px;
  flex-shrink: 0;
  z-index: 50;
}
.demo-ribbon-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-pill {
  background: var(--wa-green);
  color: #0B141A;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.demo-ribbon-text {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #D1D7DB;
}
.demo-ribbon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ribbon-btn {
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  transition: background 0.15s;
  white-space: nowrap;
}
.ribbon-btn:hover { background: rgba(255,255,255,0.22); }
.ribbon-btn.accent {
  background: #00A884;
  color: #FFFFFF;
}
.ribbon-btn.accent:hover { background: #008f70; }

/* Outer App Shell */
.shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Desktop Left WhatsApp Navigation Rail */
.desk-rail {
  width: 68px;
  background: #F0F2F5;
  border-right: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
  z-index: 10;
}
.rail-brand {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #008069, #25D366);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  display: grid;
  place-items: center;
  letter-spacing: -0.04em;
  box-shadow: 0 2px 8px rgba(0, 128, 105, 0.28);
  margin-bottom: 10px;
}
.rail-tab {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--wa-muted);
  font-size: 10px;
  font-weight: 600;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.rail-tab:hover { background: rgba(17,27,33,0.06); color: var(--wa-ink); }
.rail-tab.active {
  background: #D9FDD3;
  color: var(--wa-header);
}
.rail-tab svg { width: 22px; height: 22px; }
.tab-badge {
  position: absolute;
  top: 4px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wa-green);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.tab-badge.danger { background: var(--wa-red); }
.rail-spacer { flex: 1; }
.rail-boss-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wa-header);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}

/* Main Content Area */
.main-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
  background: var(--wa-panel);
}

/* View Containers */
.view-pane {
  display: none;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}
.view-pane.active { display: flex; }

/* ===== CHATS VIEW (2-Pane WhatsApp Web on Desktop, 1-Pane Stack on Mobile) ===== */
.chats-layout {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

/* Left Pane: Chat List */
.chat-list-pane {
  width: 390px;
  max-width: 42%;
  min-width: 320px;
  border-right: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  background: var(--wa-panel);
  min-height: 0;
  flex-shrink: 0;
}
.wa-topbar {
  background: var(--wa-header);
  color: #FFFFFF;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.wa-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wa-brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.82);
  display: block;
  margin-top: 1px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.pulse-pill-btn {
  background: rgba(255,255,255,0.16);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
}
.pulse-pill-btn:hover { background: rgba(255,255,255,0.26); }
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 0 2px rgba(37,211,102,0.3);
}

/* Search & Filters */
.list-controls {
  padding: 8px 12px 6px;
  background: var(--wa-panel);
  border-bottom: 1px solid var(--wa-border);
  flex-shrink: 0;
}
.wa-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F0F2F5;
  border-radius: 10px;
  padding: 7px 12px;
}
.wa-search svg { width: 16px; height: 16px; color: var(--wa-muted); flex-shrink: 0; }
.wa-search input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13.5px;
  outline: none;
}
.wa-search input::placeholder { color: var(--wa-muted); }

.filter-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 2px;
  scrollbar-width: none;
}
.filter-strip::-webkit-scrollbar { display: none; }
.f-chip {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #F0F2F5;
  color: #54656F;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s;
  white-space: nowrap;
}
.f-chip:hover { background: #E3E7EA; }
.f-chip.active {
  background: #D9FDD3;
  color: #008069;
}
.f-chip.nav-filter-chip {
  background: #E8F0FE;
  color: #1A73E8;
  border: 1px solid #C6DAFC;
}
.f-chip .cnt {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

/* Active Navigator Banner inside Chat List */
.nav-banner {
  background: #E7FCE8;
  border-bottom: 1px solid #C6ECC9;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #005c4b;
  font-weight: 600;
  flex-shrink: 0;
}
.nav-banner button {
  background: #FFFFFF;
  color: #008069;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Chat List Scroll */
.chat-list-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #F2F4F5;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.chat-row:hover { background: #F5F6F6; }
.chat-row.selected { background: #F0F2F5; }
.chat-row.unread .chat-name { font-weight: 700; }

/* Colorful Profile Avatar */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #FFFFFF;
  flex-shrink: 0;
  position: relative;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.avatar.sm { width: 38px; height: 38px; font-size: 13.5px; }
.avatar.xs { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-lang {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #FFFFFF;
  color: var(--wa-ink);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 6px;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.chat-main {
  flex: 1;
  min-width: 0;
}
.chat-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.chat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--wa-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-time {
  font-size: 11.5px;
  color: var(--wa-muted);
  flex-shrink: 0;
}
.chat-time.urgent { color: var(--wa-green-ink); font-weight: 700; }
.chat-time.overdue { color: var(--wa-red); font-weight: 700; }

.chat-preview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.chat-preview {
  font-size: 13px;
  color: var(--wa-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.unread-dot {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--wa-green);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.chat-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.micro-pill {
  font-size: 10.5px;
  font-weight: 650;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill-nav { background: #EFF2F5; color: #3B4A54; }
.pill-unassigned { background: var(--wa-amber-bg); color: #9A5500; }
.pill-overdue { background: var(--wa-red-bg); color: var(--wa-red); }
.pill-waiting { background: #FFF4E5; color: #B45309; }
.pill-good { background: var(--wa-green-bg); color: var(--wa-green-ink); }
.pill-flag { background: #FEE2E2; color: #B91C1C; }
.pill-cb { background: var(--wa-blue-bg); color: #1967D2; }

/* ===== RIGHT PANE: THREAD ===== */
.thread-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--wa-wallpaper);
  position: relative;
}
/* Subtle authentic WhatsApp doodle + RM Support watermark pattern */
.thread-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23008069' stroke-opacity='0.065' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 28c0-6 5-11 12-11s12 5 12 11-5 11-12 11l-7 4 2-6c-4-2-7-5-7-9z'/%3E%3Cpath d='M122 22c4 0 8 3 8 8 0 6-8 12-8 12s-8-6-8-12c0-5 4-8 8-8z'/%3E%3Ccircle cx='85' cy='48' r='9'/%3E%3Cpath d='M81 48l3 3 6-6'/%3E%3Cpath d='M145 78l10-5v14l-10-5z'/%3E%3Crect x='125' y='73' width='18' height='14' rx='3'/%3E%3Cpath d='M36 96c0-5 4-9 9-9s9 4 9 9v6c0 5-4 9-9 9s-9-4-9-9v-6z'/%3E%3Cpath d='M45 114v6m-6 0h12'/%3E%3Ctext x='86' y='118' font-family='sans-serif' font-size='11' font-weight='700' fill='%23008069' fill-opacity='0.055' stroke='none'%3ERM%3C/text%3E%3Cpath d='M25 148l16-6-6 16-3-7-7-3z'/%3E%3Cpath d='M132 140c6 0 11 4 11 10s-5 10-11 10-11-4-11-10 5-10 11-10z'/%3E%3Cpath d='M128 150h8m-4-4v8'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

/* Thread Header */
.thread-header {
  background: var(--wa-header);
  color: #FFFFFF;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.back-btn {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #FFFFFF;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.back-btn:hover { background: rgba(255,255,255,0.14); }
.thread-identity {
  flex: 1;
  min-width: 0;
}
.thread-name {
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.hdr-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.14s;
  white-space: nowrap;
}
.hdr-btn:hover { background: rgba(255,255,255,0.25); }
.hdr-btn.active {
  background: #D9FDD3;
  color: #005c4b;
}

/* Compact Boss Action Strip (Sticky right under header) */
.action-strip {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wa-border);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 4;
  flex-shrink: 0;
}
.action-strip::-webkit-scrollbar { display: none; }

.strip-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F0F2F5;
  border-radius: 999px;
  padding: 3px 9px 3px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wa-ink);
  flex-shrink: 0;
}
.strip-select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--wa-header);
  outline: none;
  cursor: pointer;
}
.strip-btn {
  flex-shrink: 0;
  height: 29px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F0F2F5;
  color: var(--wa-ink);
  transition: all 0.14s;
  white-space: nowrap;
}
.strip-btn:hover { background: #E3E7EA; }
.strip-btn.callback-cta {
  background: #008069;
  color: #FFFFFF;
}
.strip-btn.callback-cta:hover { background: #006a57; }
.strip-btn.grade-good { background: var(--wa-green-bg); color: var(--wa-green-ink); }
.strip-btn.grade-flag { background: var(--wa-red-bg); color: var(--wa-red); }
.strip-btn.missed-call-cta { background: #FEF3C7; color: #9A5500; }

/* Collapsible AI Summary Drawer (hidden by default so chat stays clean like WhatsApp!) */
.summary-drawer {
  background: #FFFFFF;
  border-bottom: 1px solid #D5E5DC;
  padding: 11px 14px;
  z-index: 4;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.summary-drawer[hidden] { display: none; }
.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.summary-title {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--wa-header);
  display: flex;
  align-items: center;
  gap: 6px;
}
.summary-bullets {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #3B4A54;
}
.summary-bullets li { margin-bottom: 3px; }
.summary-flag-note {
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--wa-red-bg);
  color: var(--wa-red);
}
.summary-flag-note.good {
  background: var(--wa-green-bg);
  color: var(--wa-green-ink);
}

/* Messages Scroll Area */
.messages-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 2;
}
.date-pill {
  align-self: center;
  background: rgba(255, 255, 255, 0.92);
  color: #54656F;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  margin: 6px 0 8px;
}
.sys-event-pill {
  align-self: center;
  background: #FFF8E1;
  color: #7C4A03;
  border: 1px solid #FDE68A;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  max-width: 92%;
}
.sys-event-pill.booked {
  background: #E6F8ED;
  color: #0F7B43;
  border-color: #B7EBC9;
}

/* Chat Bubbles */
.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}
.msg-row.in { align-self: flex-start; }
.msg-row.out { align-self: flex-end; }

.bubble {
  padding: 7px 10px 6px;
  border-radius: 9px;
  box-shadow: 0 1px 1.5px rgba(17,27,33,0.12);
  position: relative;
  font-size: 14px;
  line-height: 1.42;
  word-wrap: break-word;
}
.msg-row.in .bubble {
  background: var(--wa-in);
  border-top-left-radius: 2px;
}
.msg-row.out .bubble {
  background: var(--wa-out);
  border-top-right-radius: 2px;
}
.bubble-sender {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.msg-row.in .bubble-sender { color: #008069; }
.msg-row.out .bubble-sender { color: #005c4b; }
.sender-source {
  font-size: 10px;
  font-weight: 600;
  color: #54656F;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.bubble-text {
  margin: 0;
  white-space: pre-wrap;
}
.bubble-translation {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed rgba(0, 128, 105, 0.25);
  font-size: 13px;
  color: #0B5D4A;
}
.trans-label {
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #008069;
  display: block;
  margin-bottom: 1px;
}
.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
  font-size: 10.5px;
  color: #667781;
}
.tick-read { color: var(--wa-tick-blue); font-weight: 700; letter-spacing: -2px; font-size: 12px; }
.mini-trans-btn {
  margin-right: auto;
  font-size: 10.5px;
  font-weight: 650;
  color: #008069;
  opacity: 0.85;
}
.mini-trans-btn:hover { text-decoration: underline; opacity: 1; }

/* Voice Note Inside Bubble */
.voice-player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 215px;
  padding: 3px 0 2px;
}
.voice-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wa-teal);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
}
.voice-bars {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 24px;
}
.voice-bar {
  width: 3px;
  border-radius: 2px;
  background: #B3C2C9;
  transition: background 0.15s;
}
.voice-bar.played { background: var(--wa-teal); }
.voice-dur {
  font-size: 11px;
  color: var(--wa-muted);
  font-variant-numeric: tabular-nums;
}

/* Clickable Link Preview Inside Bubble */
.wa-link-card {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.045);
  border-left: 3px solid var(--wa-teal);
  text-decoration: none;
  color: inherit;
}
.wa-link-card:hover { background: rgba(0, 0, 0, 0.075); }
.wa-link-title { font-size: 12.5px; font-weight: 700; color: var(--wa-ink); }
.wa-link-url { font-size: 11px; color: #027EB5; word-break: break-all; margin-top: 2px; }

/* Native WhatsApp Interactive Callback Card Inside Bubble */
.wa-flow-card {
  margin-top: 6px;
  background: #FFFFFF;
  border-radius: 9px;
  border: 1px solid rgba(0, 128, 105, 0.18);
  overflow: hidden;
  min-width: 230px;
}
.wa-flow-head {
  background: linear-gradient(135deg, #008069, #00A884);
  color: #FFFFFF;
  padding: 9px 11px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.wa-flow-body {
  padding: 9px 11px;
  font-size: 12.5px;
  color: #3B4A54;
  line-height: 1.4;
}
.wa-flow-cta {
  width: 100%;
  border-top: 1px solid #E9EDEF;
  padding: 9px 11px;
  text-align: center;
  color: #008069;
  font-weight: 700;
  font-size: 13px;
  background: #F7FBF9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s;
}
.wa-flow-cta:hover { background: #E7FCE8; }

/* Compact WhatsApp Composer (Properly Proportioned on Mobile!) */
.composer-wrap {
  background: #F0F2F5;
  padding: 6px 10px 8px;
  border-top: 1px solid #E2E7EA;
  z-index: 5;
  flex-shrink: 0;
}
.composer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  padding: 0 2px;
}
.safety-badge {
  font-size: 10.5px;
  font-weight: 650;
  color: #54656F;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-draft-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: #008069;
  background: #D9FDD3;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.14s;
}
.ai-draft-btn:hover { background: #C2F7BA; }
.composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}
.composer-input-box {
  flex: 1;
  background: #FFFFFF;
  border-radius: 22px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.composer-input-box textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.35;
  max-height: 84px;
  background: transparent;
  padding: 0;
}
.send-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wa-header);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 128, 105, 0.3);
  transition: transform 0.12s, background 0.14s;
}
.send-circle-btn:hover { background: var(--wa-header-dark); transform: scale(1.04); }
.send-circle-btn svg { width: 18px; height: 18px; margin-left: 2px; }

/* ===== MY TEAM & CALLBACKS PAGES ===== */
.page-shell {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #F4F6F8;
  overflow: hidden;
}
.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}
.page-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

/* Boss Daily Pulse KPI Grid (All Clickable!) */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.pulse-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 13px 14px;
  border: 1px solid var(--wa-border);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pulse-card:hover {
  transform: translateY(-1px);
  border-color: var(--wa-teal);
  box-shadow: var(--shadow-md);
}
.pulse-card-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--wa-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pulse-card-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pulse-card-num.green { color: var(--wa-green-ink); }
.pulse-card-num.red { color: var(--wa-red); }
.pulse-card-num.amber { color: var(--wa-amber); }
.pulse-card-num.teal { color: var(--wa-header); }
.pulse-card-sub {
  font-size: 11.5px;
  color: var(--wa-muted);
}

/* Section Heading */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sec-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--wa-ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sec-sub {
  font-size: 12.5px;
  color: var(--wa-muted);
  margin: 2px 0 0;
}

/* Navigator Scorecard Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.nav-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 15px;
  border: 1px solid var(--wa-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
  cursor: pointer;
}
.nav-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--wa-teal);
}
.nav-card.alert-card {
  border-color: #FCA5A5;
  background: linear-gradient(180deg, #FFFBFB 0%, #FFFFFF 100%);
}
.nav-card-top {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-card-info { flex: 1; min-width: 0; }
.nav-card-name {
  font-size: 15px;
  font-weight: 750;
  color: var(--wa-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-card-meta {
  font-size: 11.5px;
  color: var(--wa-muted);
  margin-top: 2px;
}
.status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-green { background: var(--wa-green-bg); color: var(--wa-green-ink); }
.status-amber { background: var(--wa-amber-bg); color: #9A5500; }
.status-red { background: var(--wa-red-bg); color: var(--wa-red); }

/* Quality Score Bar */
.qual-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qual-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 650;
}
.qual-track {
  height: 7px;
  border-radius: 999px;
  background: #ECEFF1;
  overflow: hidden;
}
.qual-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* 4 Clean Numbers Grid */
.nav-stats-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #F7F9FA;
  border-radius: 11px;
  padding: 8px 6px;
  text-align: center;
}
.ns-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--wa-ink);
  line-height: 1.15;
}
.ns-val.red { color: var(--wa-red); }
.ns-val.amber { color: var(--wa-amber); }
.ns-val.green { color: var(--wa-green-ink); }
.ns-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--wa-muted);
  margin-top: 2px;
}

.nav-callout {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #FEF2F2;
  color: #B91C1C;
  font-weight: 600;
  line-height: 1.35;
}
.nav-callout.good {
  background: #ECFDF5;
  color: #065F46;
}
.nav-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--wa-header);
  padding-top: 2px;
}

/* Flagged Accountability Feed */
.flag-feed {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--wa-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.flag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #F0F2F5;
  cursor: pointer;
  transition: background 0.12s;
}
.flag-item:last-child { border-bottom: none; }
.flag-item:hover { background: #F7FAF8; }
.flag-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.flag-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--wa-red-bg);
}
.flag-icon-box.amber { background: var(--wa-amber-bg); }
.flag-item-title { font-size: 13.5px; font-weight: 700; color: var(--wa-ink); }
.flag-item-desc { font-size: 12px; color: var(--wa-muted); margin-top: 2px; }
.flag-jump-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: #E7FCE8;
  color: #006a57;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== CALLBACKS TAB ===== */
.cb-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.seg-group {
  display: inline-flex;
  background: #E5EAED;
  padding: 3px;
  border-radius: 11px;
  gap: 3px;
}
.seg-btn {
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: #54656F;
}
.seg-btn.active {
  background: #FFFFFF;
  color: var(--wa-header);
  box-shadow: var(--shadow-sm);
}
.primary-btn {
  background: var(--wa-header);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.primary-btn:hover { background: var(--wa-header-dark); }

.cb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cb-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 15px;
  border: 1px solid var(--wa-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.cb-card.overdue { border-left: 4px solid var(--wa-red); }
.cb-card.upcoming { border-left: 4px solid var(--wa-teal); }
.cb-card.done { border-left: 4px solid #94A3B8; opacity: 0.78; }
.cb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.cb-name {
  font-size: 14.5px;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cb-meta {
  font-size: 12.5px;
  color: var(--wa-muted);
  margin-top: 3px;
}
.cb-reason {
  font-size: 12.5px;
  color: #3B4A54;
  margin-top: 4px;
}
.cb-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.soft-btn {
  padding: 7px 12px;
  border-radius: 9px;
  background: #F0F2F5;
  color: var(--wa-ink);
  font-size: 12.5px;
  font-weight: 700;
}
.soft-btn:hover { background: #E3E7EA; }
.soft-btn.green { background: #D9FDD3; color: #006a57; }
.soft-btn.green:hover { background: #C2F7BA; }

/* ===== MOBILE BOTTOM TAB BAR ===== */
.mobile-nav {
  display: none;
  height: 58px;
  background: #FFFFFF;
  border-top: 1px solid var(--wa-border);
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mob-tab {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--wa-muted);
  font-size: 11px;
  font-weight: 650;
  position: relative;
}
.mob-tab.active { color: var(--wa-header); }
.mob-tab .mob-icon-pill {
  padding: 3px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mob-tab.active .mob-icon-pill { background: #D9FDD3; }
.mob-tab svg { width: 20px; height: 20px; }
.mob-badge {
  position: absolute;
  top: -3px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--wa-green);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.mob-badge.danger { background: var(--wa-red); }

/* ===== MODALS / SHEETS ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 26, 0.52);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background: #FFFFFF;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  background: var(--wa-header);
  color: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 750; }
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  color: #FFFFFF;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #3B4A54;
  margin-bottom: 4px;
}
.field-input {
  width: 100%;
  border: 1.5px solid #D9E0E4;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13.5px;
  outline: none;
}
.field-input:focus { border-color: var(--wa-teal); }
.compare-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.compare-row {
  border: 1px solid var(--wa-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #F9FBFA;
}
.compare-title { font-size: 13px; font-weight: 750; color: var(--wa-header); }
.compare-old { font-size: 12px; color: var(--wa-muted); margin-top: 3px; }
.compare-new { font-size: 12.5px; color: var(--wa-ink); font-weight: 600; margin-top: 3px; }

/* Slot Picker Grid inside Member Callback Simulator */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.slot-btn {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1.5px solid #D9E0E4;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--wa-ink);
  text-align: center;
  background: #FFFFFF;
}
.slot-btn.selected {
  border-color: var(--wa-header);
  background: #E7FCE8;
  color: #005c4b;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #111B21;
  color: #FFFFFF;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  max-width: 92vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE (MOBILE PIXEL / PHONE <= 820px) ===== */
@media (max-width: 820px) {
  .desk-rail { display: none; }
  .mobile-nav { display: flex; }
  .chat-list-pane {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-right: none;
  }
  .thread-pane {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
  }
  .chats-layout.mobile-thread-open .chat-list-pane { display: none; }
  .chats-layout.mobile-thread-open .thread-pane { display: flex; }
  .chats-layout.mobile-thread-open .back-btn { display: inline-flex; }
  .shell.thread-fullscreen .mobile-nav { display: none; }

  .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg-row { max-width: 88%; }
  .demo-ribbon { padding: 0 8px; }
  .demo-ribbon-text { font-size: 10.5px; }
  .hdr-btn span.lbl { display: none; }
  .hdr-btn { padding: 0 9px; }
  .page-scroll { padding: 12px; }
  .cb-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .cb-left { align-items: flex-start; }
  .cb-actions { justify-content: flex-end; border-top: 1px solid #F0F2F5; padding-top: 9px; }
  .cb-actions .soft-btn { flex: 1; text-align: center; }
}


/* ===== AI AUTO-REPLY & SECURE INTAKE FORM ADDITIONS ===== */
.ai-mode-pill {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.ai-mode-pill:active { transform: scale(0.97); }
.ai-mode-pill.mode-auto {
  background: #25D366;
  color: #062E19;
  box-shadow: 0 1px 6px rgba(37, 211, 102, 0.35);
}
.ai-mode-pill.mode-auto:hover { background: #2EE070; }
.ai-mode-pill.mode-draft {
  background: #FEF3C7;
  color: #854D0E;
}
.ai-mode-pill.mode-draft:hover { background: #FDE68A; }
.ai-mode-pill.mode-off {
  background: rgba(255,255,255,0.16);
  color: #E9EDEF;
}
.ai-mode-pill.mode-off:hover { background: rgba(255,255,255,0.26); }

/* Per-Chat AI Pill & Secure Form Button in Action Strip */
.strip-btn.ai-chat-pill.mode-auto {
  background: #DCFCE7;
  color: #14532D;
  border: 1px solid #86EFAC;
}
.strip-btn.ai-chat-pill.mode-draft {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}
.strip-btn.ai-chat-pill.mode-off {
  background: #E5E7EB;
  color: #374151;
  border: 1px solid #D1D5DB;
}
.strip-btn.ai-chat-pill.mode-paused {
  background: #E0F2FE;
  color: #075985;
  border: 1px solid #7DD3FC;
}
.strip-btn.resume-ai-cta {
  background: #16A34A;
  color: #FFFFFF;
}
.strip-btn.resume-ai-cta:hover { background: #15803D; }

.strip-btn.secure-form-cta {
  background: #4338CA;
  color: #FFFFFF;
}
.strip-btn.secure-form-cta:hover { background: #3730A3; }

/* Interactive Test AI Simulator Bar */
.ai-sim-bar {
  background: linear-gradient(90deg, #F0FDF4 0%, #EEF2FF 100%);
  border-bottom: 1px solid #C7EBD5;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 3;
  flex-shrink: 0;
}
.ai-sim-bar::-webkit-scrollbar { display: none; }
.ai-sim-label {
  font-size: 11px;
  font-weight: 800;
  color: #065F46;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.ai-sim-btn {
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #FFFFFF;
  color: #006652;
  border: 1px solid #86EFAC;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.14s;
}
.ai-sim-btn:hover {
  background: #DCFCE7;
  border-color: #22C55E;
}
.ai-sim-btn.hipaa {
  color: #3730A3;
  border-color: #A5B4FC;
}
.ai-sim-btn.hipaa:hover {
  background: #E0E7FF;
  border-color: #6366F1;
}
.ai-sim-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Composer AI Status & Inline Resume */
.composer-ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.safety-badge.mode-auto { color: #0F7B43; }
.safety-badge.mode-paused { color: #0369A1; }
.safety-badge.mode-draft { color: #9A5500; }
.safety-badge.mode-off { color: #54656F; }

.inline-resume-btn {
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
  background: #16A34A;
  padding: 2px 8px;
  border-radius: 999px;
  transition: background 0.14s;
}
.inline-resume-btn:hover { background: #15803D; }

/* Secure Intake Form WhatsApp Card inside Bubble */
.wa-flow-card.secure-card {
  border-color: rgba(67, 56, 202, 0.24);
}
.wa-flow-card.secure-card .wa-flow-head {
  background: linear-gradient(135deg, #3730A3, #4F46E5);
}
.wa-flow-card.secure-card .wa-flow-cta {
  color: #3730A3;
  background: #EEF2FF;
}
.wa-flow-card.secure-card .wa-flow-cta:hover {
  background: #E0E7FF;
}

/* System Pills for HIPAA Guardrail & Human Takeover */
.sys-event-pill.hipaa {
  background: #EEF2FF;
  color: #312E81;
  border-color: #C7D2FE;
}
.sys-event-pill.takeover {
  background: #E0F2FE;
  color: #075985;
  border-color: #BAE6FD;
}

/* AI Typing Indicator Bubble */
.ai-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #D9FDD3;
  color: #065F46;
  border-radius: 12px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.ai-typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #008069;
  animation: aiDotBounce 1.1s infinite ease-in-out both;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes aiDotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Secure Intake Form Modal */
.modal-head.secure-modal-head {
  background: linear-gradient(135deg, #312E81, #4338CA);
}
.hipaa-shield-banner {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #1E1B4B;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.sf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.primary-btn.secure-submit-btn {
  background: #4338CA;
}
.primary-btn.secure-submit-btn:hover { background: #3730A3; }
.sf-success-box {
  text-align: center;
  padding: 14px 10px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 14px;
}
.sf-success-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}
.sf-success-box h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #14532D;
}
.sf-success-box p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
}
.sf-receipt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  color: #166534;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Mobile tweaks for new AI controls */
@media (max-width: 820px) {
  .wa-topbar { padding: 10px 12px; gap: 6px; }
  .wa-brand-title { font-size: 16px; }
  .wa-brand-sub { font-size: 11px; }
  .ai-mode-pill { padding: 4px 8px; font-size: 10.5px; }
  .pulse-pill-btn { padding: 4px 8px; font-size: 11px; }
  .sf-two-col { grid-template-columns: 1fr; }
}
