/* ═══════════════════════════════════════════════════════════════════════════
   MERIDIAN CRM — Apple macOS & iOS Dark Edition (Production Theme)
   Native Ergonomics · iMessage Aesthetics · Zero-GPU Blur & Deep Contrast
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --apple-dark-bg:
    radial-gradient(1100px circle at 15% 18%, rgba(10, 132, 255, 0.28), transparent 55%),
    radial-gradient(1000px circle at 85% 22%, rgba(94, 92, 230, 0.25), transparent 55%),
    linear-gradient(135deg, #0D111A 0%, #151B29 50%, #0F1420 100%);

  --apple-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --apple-mono: 'SF Mono', 'JetBrains Mono', Consolas, monospace;

  /* Overwrite base app variables with Apple Dark palette */
  --bg: #0D111A;
  --surface: #1E2330;
  --border: rgba(255, 255, 255, 0.10);
  --text: #F5F5F7;
  --muted: #A1A1A6;
  --muted2: #6E6E73;

  --blue: #0A84FF;
  --blue-d: #0071E3;
  --blue-bg: rgba(10, 132, 255, 0.18);
  --blue-b: rgba(10, 132, 255, 0.35);

  --green: #34C759;
  --green-bg: rgba(52, 199, 89, 0.18);
  --green-b: rgba(52, 199, 89, 0.35);

  --amber: #FF9F0A;
  --amber-bg: rgba(255, 159, 10, 0.18);
  --amber-b: rgba(255, 159, 10, 0.35);

  --red: #FF453A;
  --red-bg: rgba(255, 69, 58, 0.18);
  --red-b: rgba(255, 69, 58, 0.35);

  --violet: #BF5AF2;

  /* Overwrite iOS card & drawer variables */
  --ios-bg: #141822;
  --ios-card: #1F2433;
  --ios-sep: rgba(255, 255, 255, 0.10);
  --ios-lbl: #8E8E93;
  --ios-txt: #F5F5F7;
  --ios-blue: #0A84FF;
  --ios-green: #30D158;

  --sh: 0 1px 3px rgba(0, 0, 0, 0.45);
  --sh-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --sh-lg: 0 14px 40px rgba(0, 0, 0, 0.65);
}

/* Global body & font reset */
body {
  font-family: var(--apple-font) !important;
  background: var(--apple-dark-bg) !important;
  color: var(--text) !important;
  background-attachment: fixed !important;
  -webkit-font-smoothing: antialiased;
}

/* Login overlay in Apple Style */
#loginOverlay {
  background: radial-gradient(1000px circle at 50% 20%, rgba(10, 132, 255, 0.22), transparent 70%), #0D111A !important;
}
.login-card {
  background: rgba(30, 35, 48, 0.85) !important;
  backdrop-filter: blur(30px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6) !important;
  color: #F5F5F7 !important;
}
.login-card h2 {
  color: #fff !important;
}
.login-card input {
  background: rgba(20, 24, 34, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}
.login-card input:focus {
  border-color: #0A84FF !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25) !important;
}
.login-card .btn-primary {
  background: linear-gradient(180deg, #2492FF 0%, #007AFF 100%) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35) !important;
}

/* ─── Modern Apple Web Header ─── */
.hdr, .hx-glass {
  background: rgba(20, 24, 34, 0.78) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}
.logo, .hx-logo {
  color: #0A84FF !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

/* Segmented Control Navigation Tabs */
.hx-seg {
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 3px !important;
  border-radius: 10px !important;
  gap: 2px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.navtab {
  background: transparent !important;
  color: #A1A1A6 !important;
  border-radius: 8px !important;
  border: none !important;
  padding: 5px 13px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: all 0.18s ease !important;
}
.navtab:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
.navtab.active {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
}

/* User & Profile Badges */
.hx-user {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #F5F5F7 !important;
  border-radius: 999px !important;
  padding: 4px 11px !important;
}
.hx-ava {
  background: linear-gradient(180deg, #5AC8FA 0%, #007AFF 100%) !important;
}
.clock {
  color: #86868B !important;
}
.bell-btn, .hx-exit {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #F5F5F7 !important;
  border-radius: 8px !important;
}
.bell-btn:hover, .hx-exit:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}
.hx-tool {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #E5E5EA !important;
  border-radius: 8px !important;
}
.hx-tool:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}
.hx-adminbar {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ─── Messenger 3-Column Glass Panels ─── */
.msg-wrap {
  --ios: #0A84FF !important;
  --ios-d: #0071E3 !important;
  --ink: #F5F5F7 !important;
  --ink2: #A1A1A6 !important;
  --ink3: #6E6E73 !important;
  --sep: rgba(255, 255, 255, 0.10) !important;
  --fill: rgba(255, 255, 255, 0.08) !important;
  --text: #F5F5F7 !important;
  --muted: #A1A1A6 !important;
  --muted2: #6E6E73 !important;
  background: transparent !important;
}
.msg-folders {
  background: rgba(18, 22, 32, 0.75) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.fold-hd {
  padding: 16px 16px 8px !important;
}
.fold-hd h2 {
  color: #FFFFFF !important;
  font-weight: 700 !important;
}
.fold-hd .fold-sub {
  color: #8E8E93 !important;
}
.fold-search input {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  border-radius: 10px !important;
  padding: 8px 12px 8px 31px !important;
}
.fold-search input::placeholder {
  color: #8E8E93 !important;
}
.fold-search span {
  color: #8E8E93 !important;
}
.fold-search input:focus {
  border-color: #0A84FF !important;
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25) !important;
}

/* Швидкі фільтри (qchip) */
.qfilter-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  padding: 0 14px 8px !important;
}
.qchip {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #E5E5EA !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 5px 9px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}
.qchip:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
}
.qchip.on {
  background: #0A84FF !important;
  color: #FFFFFF !important;
  border-color: #0A84FF !important;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.40) !important;
}

/* ГЕО фільтр */
.geo-filter-bar {
  padding: 0 14px 8px !important;
}
.geo-filter-sel {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  font-weight: 600 !important;
  outline: none !important;
}
.geo-filter-sel option {
  background: #181C26 !important;
  color: #FFFFFF !important;
}
.geo-filter-sel:focus {
  border-color: #0A84FF !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25) !important;
}

/* Папки та дерево команд */
.fold-sec {
  color: #8E8E93 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 12px 8px 4px !important;
}
.fold {
  background: transparent !important;
  color: #F5F5F7 !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  margin-bottom: 2px !important;
  transition: background 0.15s ease !important;
}
.fold:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}
.fold.active {
  background: rgba(10, 132, 255, 0.22) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}
.fold.active .fold-name {
  color: #FFFFFF !important;
}
.fold-name {
  color: #F5F5F7 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
}
.fold-meta {
  color: #8E8E93 !important;
  font-size: 11px !important;
}
.fold.active .fold-meta {
  color: rgba(255, 255, 255, 0.75) !important;
}
.fold-cnt {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #D1D1D6 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}
.fold-cnt.unread {
  background: #0A84FF !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(10, 132, 255, 0.40) !important;
}

/* Відділи, менеджери, сейли */
.dept-hd, .mgr-hd, .sale-hd {
  color: #F5F5F7 !important;
  background: transparent !important;
  border-radius: 10px !important;
  padding: 6px 8px !important;
  width: 100% !important;
}
.dept-hd:hover, .mgr-hd:hover, .sale-hd:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
.mgr-hd.active, .sale-hd.active {
  background: rgba(10, 132, 255, 0.22) !important;
  color: #FFFFFF !important;
}
.dept-nm, .mgr-nm, .sale-nm {
  color: #F5F5F7 !important;
  font-weight: 600 !important;
}
.dept-sub, .mgr-sub2, .sale-meta {
  color: #8E8E93 !important;
}
.dept-chev, .mgr-chev, .sale-chev {
  color: #8E8E93 !important;
}
.dept-chev:hover, .mgr-chev:hover, .sale-chev:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.12) !important;
}
.dept-empty {
  color: #8E8E93 !important;
}
.mgr-sub {
  color: #D1D1D6 !important;
  background: transparent !important;
  border-radius: 9px !important;
  padding: 5px 8px !important;
}
.mgr-sub:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
.mgr-sub.active {
  background: rgba(10, 132, 255, 0.22) !important;
  color: #FFFFFF !important;
}
.si-nm {
  color: #F5F5F7 !important;
}
.node-badge .node-cnt {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #A1A1A6 !important;
}
.node-badge .node-unread {
  background: #0A84FF !important;
  color: #FFFFFF !important;
}
.fold-archived-hd {
  color: #8E8E93 !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* WhatsApp Channel Avatars & Badges */
.conv-av.whatsapp, .ih-ava.whatsapp, .fold-ic.wa {
  background: linear-gradient(135deg, #34C759 0%, #1E8E3E 100%) !important;
}
.conv-av.website, .ih-ava.website, .fold-ic.web {
  background: linear-gradient(135deg, #0A84FF 0%, #0071E3 100%) !important;
}
.ch-badge.whatsapp, .conv-src.wa {
  background: rgba(52, 199, 89, 0.20) !important;
  color: #34C759 !important;
  border: 1px solid rgba(52, 199, 89, 0.35) !important;
}
.ch-badge.website, .conv-src.web {
  background: rgba(10, 132, 255, 0.18) !important;
  color: #0A84FF !important;
  border: 1px solid rgba(10, 132, 255, 0.35) !important;
}

/* Conversation List Column */
.msg-left {
  background: rgba(20, 24, 34, 0.70) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.msg-left-hd h2 {
  color: #F5F5F7 !important;
}
.conv-sub {
  color: #86868B !important;
}

/* Conversation items */
.conv {
  border-radius: 12px !important;
  padding: 10px 12px !important;
  margin-bottom: 2px !important;
  transition: all 0.16s ease !important;
  color: #F5F5F7 !important;
  border: 1px solid transparent !important;
}
.conv:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}
.conv.active {
  background: linear-gradient(180deg, #1E8FFF 0%, #007AFF 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35) !important;
}
.conv.active .conv-name,
.conv.active .conv-last,
.conv.active .conv-time {
  color: #fff !important;
}
.conv-name {
  color: #F5F5F7 !important;
  font-weight: 700 !important;
}
.conv-last {
  color: #A1A1A6 !important;
}
.conv-time {
  color: #86868B !important;
}

/* Center Chat Stage */
.msg-center {
  background: rgba(28, 32, 44, 0.82) !important;
  backdrop-filter: blur(35px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(35px) saturate(190%) !important;
}
.msg-chat-hd {
  background: rgba(24, 28, 38, 0.88) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #F5F5F7 !important;
}
.msg-chat-hd h3, .msg-chat-hd span, .msg-chat-hd strong {
  color: #F5F5F7 !important;
}
.translate-bar {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #D1D1D6 !important;
}
.tr-lang-pill {
  background: rgba(10, 132, 255, 0.2) !important;
  border: 1px solid rgba(10, 132, 255, 0.4) !important;
  color: #fff !important;
}

/* Authentic iMessage Bubbles in Body */
.msg-chat-body {
  background: transparent !important;
}

/* Incoming Visitor Messages */
.mb-row.them .mb-bubble {
  background: #2C2C2E !important;
  color: #F5F5F7 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px 18px 18px 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* Outgoing Operator Messages (Apple Blue) */
.mb-row.me .mb-bubble {
  background: linear-gradient(180deg, #2492FF 0%, #007AFF 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 18px 18px 4px 18px !important;
  box-shadow: 0 3px 10px rgba(0, 122, 255, 0.32) !important;
}
.mb-meta, .mb-time {
  color: #86868B !important;
}
.mb-row.me .mb-meta {
  color: rgba(255, 255, 255, 0.7) !important;
}
.mb-actions {
  background: #242938 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* iMessage Composer Input Bar & Lang-Guard */
.lang-guard {
  background: rgba(24, 28, 38, 0.94) !important;
  color: #A1A1A6 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.lang-guard b {
  color: #F5F5F7 !important;
}
.msg-chat-input {
  background: rgba(24, 28, 38, 0.94) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.msg-chat-input input, #msgInput {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #F5F5F7 !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  font-family: var(--apple-font) !important;
}
.msg-chat-input input:focus, #msgInput:focus {
  border-color: #0A84FF !important;
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.22) !important;
}
.msg-send {
  background: linear-gradient(180deg, #2492FF 0%, #007AFF 100%) !important;
  color: #fff !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  border: none !important;
  box-shadow: 0 3px 8px rgba(0, 122, 255, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}
.msg-form-btn, .msg-wa-toggle {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #fff !important;
  border-radius: 999px !important;
}

/* Right Inspector / Client Drawer */
.msg-right, #msgRight, .drawer {
  background: rgba(20, 24, 34, 0.88) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #F5F5F7 !important;
}
.ios-hero {
  background: rgba(30, 35, 48, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  color: #F5F5F7 !important;
}
.ios-hero .ih-name {
  color: #FFFFFF !important;
}
.dr-card, .dr-sec, .dr-section {
  background: rgba(30, 35, 48, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  color: #F5F5F7 !important;
}
.dr-sec-t {
  color: #A1A1A6 !important;
}
.ss-qual, .ss-qual-input {
  background: rgba(20, 24, 34, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #F5F5F7 !important;
}
.ss-qual:focus, .ss-qual-input:focus {
  border-color: #0A84FF !important;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.25) !important;
}

/* ─── Contacts / Leads Table View ─── */
.panel {
  background: rgba(24, 28, 38, 0.8) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #F5F5F7 !important;
}
.mc {
  background: rgba(30, 35, 48, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) !important;
}
.mc .mv {
  color: #fff !important;
}
.table-wrap, table {
  color: #F5F5F7 !important;
}
tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
tr:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}
th {
  background: rgba(20, 24, 34, 0.85) !important;
  color: #86868B !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
td {
  color: #F5F5F7 !important;
}

/* Modals & Slide-overs & Complete Fix for All White Strips */
:root, html, body {
  color-scheme: dark !important;
}

/* Search bar in Conversation List (#msgSearch) */
.msg-search {
  position: relative !important;
  margin: 0 14px 8px !important;
}
.msg-search span {
  color: #8E8E93 !important;
}
.msg-search input, #msgSearch {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  padding: 8px 12px 8px 32px !important;
  font-size: 13px !important;
  color: #F5F5F7 !important;
  outline: none !important;
}
.msg-search input::placeholder, #msgSearch::placeholder {
  color: #8E8E93 !important;
}
.msg-search input:focus, #msgSearch:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #0A84FF !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25) !important;
}

/* Vertical Resize Grabbers (прибираємо білу вертикальну смужку між колонками) */
.resize-handle {
  background: transparent !important;
}
.resize-handle:hover, .resize-handle.active {
  background: rgba(10, 132, 255, 0.18) !important;
}
.resize-grabber {
  background: rgba(255, 255, 255, 0.14) !important;
  width: 2px !important;
  height: 36px !important;
  border-radius: 2px !important;
}
.resize-handle:hover .resize-grabber, .resize-handle.active .resize-grabber {
  background: #0A84FF !important;
  width: 3px !important;
}

/* Export Button («⬇ Вивантажити» у шапці чату) & Dropdown */
.export-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #F5F5F7 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}
.export-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: #FFFFFF !important;
}
.export-dd {
  background: rgba(28, 32, 44, 0.96) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55) !important;
}
.export-dd-item {
  color: #F5F5F7 !important;
}
.export-dd-item:hover {
  background: rgba(255, 255, 255, 0.10) !important;
}
.export-dd-sep {
  background: rgba(255, 255, 255, 0.10) !important;
}
.export-dd-hint {
  background: rgba(10, 132, 255, 0.22) !important;
  color: #64D2FF !important;
}

/* Банер «N повідомлень без перекладу» (.tr-backfill-banner) та цитати/відповіді */
.tr-backfill-banner {
  background: rgba(20, 26, 40, 0.95) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  color: #64D2FF !important;
  border: 1px solid rgba(10, 132, 255, 0.40) !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}
.tr-backfill-banner:hover {
  background: rgba(26, 36, 56, 0.98) !important;
  border-color: #0A84FF !important;
  color: #FFFFFF !important;
}
.msg-reply-bar {
  background: rgba(28, 32, 44, 0.95) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #F5F5F7 !important;
}
.msg-reply-bar .r-close {
  color: #A1A1A6 !important;
}
.mb-row.them .mb-quote {
  background: rgba(255, 255, 255, 0.08) !important;
  border-left-color: #0A84FF !important;
  color: #E5E5EA !important;
}

/* Додаткові елементи лівої колонки (.msg-folders) */
.dept-grp {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.dept-office-grp {
  background: rgba(255, 255, 255, 0.03) !important;
}
.dept-office-hd, .dept-office-nm {
  color: #F5F5F7 !important;
}
.si-geo-sec-hd {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #D1D1D6 !important;
}
.mgr-sub .si-ic {
  background: rgba(48, 209, 88, 0.18) !important;
  color: #30D158 !important;
}
.si-ic-geo {
  background: rgba(255, 255, 255, 0.08) !important;
}
.wactx, .wactx-submenu {
  background: rgba(24, 28, 38, 0.96) !important;
  backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #F5F5F7 !important;
}
.wactx-hd {
  color: #A1A1A6 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.wactx-it {
  color: #F5F5F7 !important;
}
.wactx-it:hover {
  background: rgba(255, 255, 255, 0.10) !important;
}
.wactx-subhd {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #A1A1A6 !important;
}

/* Панель «Користувачі та WhatsApp API» (#c2Panel) і Міні-дашборд користувача */
.ctor-modal, .c2-panel {
  background: rgba(20, 24, 34, 0.96) !important;
  backdrop-filter: blur(40px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(190%) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #F5F5F7 !important;
  width: 620px !important;
  max-width: 96vw !important;
}
.c2-panel-hd {
  background: rgba(28, 33, 46, 0.90) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #FFFFFF !important;
}
.c2-panel-title {
  color: #FFFFFF !important;
  font-weight: 700 !important;
}
.c2-back-btn, .c2-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F5F5F7 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.c2-back-btn:hover, .c2-close-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
}
.c2-breadcrumb {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #A1A1A6 !important;
}
.c2-bc-link {
  color: #0A84FF !important;
}
.c2-bc-cur {
  color: #F5F5F7 !important;
}
.c2-search, .c2-search-sel, .ctor-input, .ctor-select, .ctor-field input, .ctor-field select {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #F5F5F7 !important;
  border-radius: 10px !important;
}
.c2-search::placeholder, .ctor-input::placeholder {
  color: #8E8E93 !important;
}
.c2-search:focus, .ctor-input:focus, .ctor-select:focus {
  border-color: #0A84FF !important;
  background: rgba(255, 255, 255, 0.11) !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.22) !important;
  outline: none !important;
}
.c2-search-sel option, .ctor-select option, .c2-geo-sel option {
  background: #181C26 !important;
  color: #F5F5F7 !important;
}
.ctor-label {
  color: #A1A1A6 !important;
}
.c2-list, .c2-person-card {
  background: transparent !important;
}
.c2-row {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  margin-bottom: 8px !important;
  padding: 12px 14px !important;
  color: #F5F5F7 !important;
  transition: all 0.16s ease !important;
}
.c2-row:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(10, 132, 255, 0.40) !important;
}
.c2-row-title {
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 14.5px !important;
}
.c2-row-sub {
  color: #A1A1A6 !important;
  margin-top: 3px !important;
}
.c2-row-stats {
  font-size: 11.5px !important;
  color: #8E8E93 !important;
  margin-top: 5px !important;
}
.c2-row-stats b {
  color: #E5E5EA !important;
}
.c2-act-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F5F5F7 !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}
.c2-person-hd, .c2-hero-card {
  background: linear-gradient(145deg, rgba(34, 41, 58, 0.90), rgba(24, 29, 42, 0.90)) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
}
.c2-person-name {
  color: #FFFFFF !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}
.c2-person-sub {
  color: #A1A1A6 !important;
}
.c2-person-section {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
}
.c2-section-title {
  color: #8E8E93 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 10px !important;
}

/* KPI Grid in User Mini-Dashboard */
.c2-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
}
.c2-kpi-tile {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  text-align: center !important;
}
.c2-kpi-tile.wa {
  background: rgba(48, 209, 88, 0.10) !important;
  border-color: rgba(48, 209, 88, 0.25) !important;
}
.c2-kpi-tile.web {
  background: rgba(10, 132, 255, 0.10) !important;
  border-color: rgba(10, 132, 255, 0.25) !important;
}
.c2-kpi-tile.hot {
  background: rgba(255, 69, 58, 0.10) !important;
  border-color: rgba(255, 69, 58, 0.25) !important;
}
.c2-kpi-val {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  font-variant-numeric: tabular-nums !important;
}
.c2-kpi-lbl {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #A1A1A6 !important;
  margin-top: 3px !important;
}

/* Wazzup Key Status & Safe Verification */
.c2-kpill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}
.c2-kpill.none {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #A1A1A6 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.c2-kpill.ok {
  background: rgba(48, 209, 88, 0.16) !important;
  color: #30D158 !important;
  border: 1px solid rgba(48, 209, 88, 0.35) !important;
}
.c2-kpill.err {
  background: rgba(255, 69, 58, 0.18) !important;
  color: #FF453A !important;
  border: 1px solid rgba(255, 69, 58, 0.35) !important;
}
.c2-safe-banner {
  background: rgba(10, 132, 255, 0.12) !important;
  border: 1px solid rgba(10, 132, 255, 0.28) !important;
  color: #D1E8FF !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  margin-bottom: 10px !important;
}
.c2-wz-empty-box, .c2-wz-active-box {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px dashed rgba(255, 255, 255, 0.16) !important;
  border-radius: 11px !important;
  padding: 11px 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
.c2-verify-box {
  margin-top: 10px !important;
  border-radius: 11px !important;
  padding: 11px 13px !important;
  background: rgba(16, 20, 30, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.c2-verify-err {
  color: #FF453A !important;
  font-size: 12.5px !important;
}
.c2-verify-ch-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  font-size: 12.5px !important;
  color: #F5F5F7 !important;
}
.c2-ch-row {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 11px !important;
  padding: 9px 12px !important;
  margin-bottom: 6px !important;
  color: #F5F5F7 !important;
}
.c2-ch-row.is-banned {
  background: rgba(255, 69, 58, 0.10) !important;
  border-color: rgba(255, 69, 58, 0.35) !important;
}
.c2-ch-name {
  color: #FFFFFF !important;
  font-weight: 700 !important;
}
.c2-ch-phone {
  color: #A1A1A6 !important;
}
.c2-ch-state.c2-ch-ok {
  background: rgba(48, 209, 88, 0.18) !important;
  color: #30D158 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}
.c2-ch-state.c2-ch-err {
  background: rgba(255, 69, 58, 0.22) !important;
  color: #FF453A !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}
.c2-ch-state.c2-ch-warn {
  background: rgba(255, 159, 10, 0.20) !important;
  color: #FF9F0A !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}
.c2-geo-sel {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #F5F5F7 !important;
  border-radius: 8px !important;
}
.c2-hist-item {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  margin-bottom: 6px !important;
}
.c2-snap-pill {
  font-size: 11px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: #E5E5EA !important;
}
.c2-empty-inline {
  color: #8E8E93 !important;
  font-size: 12.5px !important;
  padding: 6px 0 !important;
}
.c2-add-section, .c2-add-toggle {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #F5F5F7 !important;
}
.ctor-btn.secondary {
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #F5F5F7 !important;
}
.ctor-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.16) !important;
}
.ctor-btn.primary {
  background: linear-gradient(180deg, #2492FF 0%, #007AFF 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}
