﻿:root {
  color-scheme: dark;
  --app-bg: #070b10;
  --panel: #111820;
  --panel-2: #0d151c;
  --panel-3: #16222c;
  --line: #23313b;
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #eef6f4;
  --muted: #8c9aa3;
  --accent: #00a884;
  --accent-2: #005c4b;
  --bubble-in: #1f2c34;
  --bubble-out: #005c4b;
  --danger: #ffb4a8;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--app-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body:not(.authenticated) .app-shell {
  display: none;
}

body.authenticated .access-gate {
  display: none;
}

body.authenticated .public-landing {
  display: none;
}

body:not(.authenticated):not(.show-login) .access-gate {
  display: none;
}

body.show-login .public-landing {
  display: none;
}

.public-landing {
  height: 100dvh;
  overflow-y: auto;
  background: #070b10;
  color: var(--text);
}

.landing-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 16, 0.84);
  backdrop-filter: blur(14px);
}

.landing-brand,
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-brand,
.landing-nav a {
  color: var(--text);
  text-decoration: none;
}

.landing-nav-links {
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.landing-nav-links a {
  color: #a9bac3;
}

.ghost-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 24, 32, 0.78);
  color: var(--text);
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 800;
}

.landing-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 92dvh;
  padding: 132px clamp(20px, 6vw, 84px) 82px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 11, 16, 0.22), rgba(7, 11, 16, 0.88)),
    linear-gradient(135deg, rgba(0, 168, 132, 0.18), rgba(65, 139, 207, 0.14) 48%, rgba(240, 99, 75, 0.08)),
    #071016;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22px 22px, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 80px 58px, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px);
  background-size: 104px 104px, 144px 144px;
  opacity: 0.68;
}

.hero-scene {
  position: absolute;
  inset: 86px clamp(18px, 5vw, 72px) auto auto;
  z-index: 1;
  width: min(640px, 52vw);
  opacity: 0.95;
}

.hero-chat-window {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(160, 198, 225, 0.22);
  border-radius: 8px;
  background: rgba(18, 27, 38, 0.88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.hero-window-bar,
.hero-connections {
  display: flex;
  gap: 14px;
}

.hero-window-bar {
  align-items: center;
  justify-content: space-between;
}

.hero-window-bar span {
  color: #a7d2ff;
  font-size: 22px;
  font-weight: 800;
}

.hero-window-bar button,
.primary-cta,
.secondary-cta,
.plan-register {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.hero-window-bar button {
  background: #9ed0ff;
  color: #06121e;
  padding: 10px 16px;
}

.hero-connections article,
.hero-inbox-preview {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #263241;
}

.hero-connections article {
  position: relative;
  display: grid;
  flex: 1;
  gap: 5px;
  min-height: 154px;
  padding: 22px 18px;
}

.whatsapp-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 214, 143, 0.15);
  color: #2be58f;
  font-weight: 900;
}

.hero-connections strong {
  margin-top: 6px;
}

.hero-connections small {
  color: #a8b5bf;
}

.hero-connections em {
  width: max-content;
  margin-top: 14px;
  border: 1px solid rgba(95, 220, 128, 0.58);
  border-radius: 999px;
  color: #6cdc78;
  padding: 7px 11px;
  font-size: 13px;
  font-style: normal;
}

.hero-inbox-preview {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.hero-inbox-preview span,
.hero-inbox-preview small {
  color: #a8b5bf;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
}

.eyebrow,
.section-heading span,
.price-card span {
  color: #94c8ff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 12px 0 12px;
  font-size: clamp(56px, 12vw, 132px);
  line-height: 0.88;
}

.hero-content p {
  width: min(640px, 100%);
  margin: 0;
  color: #c5d2d8;
  font-size: clamp(18px, 2.3vw, 25px);
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-cta,
.secondary-cta {
  padding: 13px 18px;
}

.primary-cta {
  background: var(--accent);
  color: #041b16;
}

.secondary-cta {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 32, 0.72);
  color: var(--text);
}

.landing-content {
  display: grid;
  gap: 24px;
  padding: 42px clamp(18px, 5vw, 72px) 70px;
  background: #0b1117;
}

.benefits-section,
.plans-section {
  display: grid;
  gap: 22px;
}

.section-heading {
  display: grid;
  gap: 8px;
  width: min(720px, 100%);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.benefit-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.benefit-grid article,
.price-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
}

.benefit-grid article {
  min-height: 150px;
  padding: 18px;
}

.benefit-grid strong {
  font-size: 18px;
}

.benefit-grid p,
.price-card p,
.price-card li {
  margin: 0;
  color: #a9bac3;
  line-height: 1.45;
}

.price-card {
  align-content: start;
  padding: 22px;
}

.price-card.highlighted {
  border-color: rgba(0, 168, 132, 0.6);
  background: linear-gradient(180deg, rgba(0, 168, 132, 0.14), #111820 38%);
}

.price-card strong {
  font-size: 44px;
}

.price-card strong::after {
  content: " /mes";
  color: var(--muted);
  font-size: 14px;
}

.price-card ul {
  display: grid;
  gap: 8px;
  margin: 6px 0 8px;
  padding: 0;
  list-style: none;
}

.price-card li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 900;
}

.plan-register {
  margin-top: 6px;
  background: #9ed0ff;
  color: #06121e;
  padding: 12px 14px;
}

.access-gate {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  background: #071016;
}

.access-panel {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 34px;
  border-right: 1px solid var(--line);
  background: #0b1117;
}

.access-panel h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.access-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.access-form {
  display: grid;
  gap: 12px;
}

.access-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.access-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #18212a;
  color: var(--text);
  padding: 12px 14px;
}

.access-form button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--accent);
  color: #001f18;
  cursor: pointer;
  font-weight: 800;
}

.access-form p {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.access-status {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
}

.access-status span {
  color: var(--muted);
  font-size: 13px;
}

.access-art {
  display: grid;
  place-items: center;
  padding: 32px;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px),
    linear-gradient(135deg, rgba(0, 168, 132, 0.12), transparent 45%);
  background-size: 92px 92px, 100% 100%;
}

.access-card {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.86);
}

.access-card strong {
  font-size: 24px;
}

.access-card span {
  color: var(--muted);
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  --sidebar-width: 292px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(300px, 344px) minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--app-bg);
  font-size: 16px;
}

.app-shell.details-open {
  grid-template-columns: var(--sidebar-width) minmax(292px, 330px) minmax(0, 1fr) minmax(280px, 320px);
}

.app-shell.module-open {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-shell.sidebar-collapsed {
  --sidebar-width: 72px;
}

.app-shell.module-open .inbox-pane,
.app-shell.module-open .chat-pane,
.app-shell.module-open .details-panel {
  display: none;
}

.workspace-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #1f2938;
  transition: width 0.18s ease;
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #20283a;
}

.workspace-brand strong {
  font-size: 26px;
}

.app-shell.sidebar-collapsed .workspace-brand {
  justify-content: center;
  padding-right: 8px;
  padding-left: 8px;
}

.app-shell.sidebar-collapsed .workspace-brand .brand-mark,
.app-shell.sidebar-collapsed .workspace-brand strong {
  display: none;
}

.workspace-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px 12px;
  overflow-y: auto;
}

.workspace-link,
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 16px;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
}

.app-shell.sidebar-collapsed .workspace-link,
.app-shell.sidebar-collapsed .theme-toggle {
  justify-content: center;
  gap: 0;
  padding: 0;
}

.app-shell.sidebar-collapsed .workspace-link {
  font-size: 0;
}

.app-shell.sidebar-collapsed .theme-toggle strong,
.app-shell.sidebar-collapsed .theme-toggle input {
  display: none;
}

.workspace-link span,
.theme-toggle span {
  display: grid;
  place-items: center;
  width: 28px;
  color: #ffffff;
}

.workspace-link svg,
.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-link[hidden] {
  display: none;
}

.app-shell.sidebar-collapsed .workspace-link span,
.app-shell.sidebar-collapsed .theme-toggle span {
  width: 32px;
}

.workspace-link:hover,
.workspace-link.active,
.theme-toggle {
  background: rgba(255, 255, 255, 0.07);
}

.workspace-menu-group {
  display: grid;
  gap: 4px;
}

.workspace-menu-group[hidden] {
  display: none;
}

.workspace-menu-group summary {
  list-style: none;
}

.workspace-menu-group summary::-webkit-details-marker {
  display: none;
}

.workspace-menu-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.65;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.workspace-menu-group[open] summary::after {
  transform: rotate(225deg);
}

.workspace-menu-group.active > summary {
  background: rgba(255, 255, 255, 0.07);
}

.workspace-subnav {
  display: grid;
  gap: 3px;
  padding-left: 42px;
}

.workspace-sublink {
  min-height: 34px;
  border-radius: 7px;
  color: #a9bfcc;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.workspace-sublink.active {
  color: #19d4b6;
  background: rgba(0, 168, 132, 0.12);
}

.app-shell.sidebar-collapsed .workspace-menu-group summary::after,
.app-shell.sidebar-collapsed .workspace-subnav {
  display: none;
}

.single-panel-grid {
  grid-template-columns: minmax(0, 1fr);
}

.ai-knowledge-panel {
  margin-top: 12px;
}

.ai-knowledge-panel > header > div:first-child {
  display: grid;
  gap: 2px;
}

.ai-knowledge-panel > header span {
  color: #9fb0bc;
  font-size: 12px;
}

.knowledge-accordion {
  display: grid;
  gap: 4px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.knowledge-category-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.34);
  overflow: hidden;
}

.knowledge-category-head {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) 98px 68px 104px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 8px;
}

.knowledge-category-card:has(.knowledge-items-list:not([hidden])) .knowledge-category-head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.knowledge-category-toggle {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(158, 208, 255, 0.2);
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.28);
  color: #9ed0ff;
  cursor: pointer;
  padding: 0;
}

.knowledge-category-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.knowledge-category-toggle.is-open svg {
  transform: rotate(90deg);
}

.knowledge-category-head > div {
  display: grid;
  gap: 0;
  min-width: 0;
}

.knowledge-category-head strong {
  color: #f8fbff;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-item-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-category-card summary small,
.knowledge-item-row small,
.knowledge-empty {
  color: #9fb0bc;
  font-size: 12px;
}

.knowledge-category-head small {
  display: none;
}

.knowledge-count {
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.knowledge-category-head .module-status {
  justify-self: start;
  min-width: 62px;
  padding: 5px 10px;
  font-size: 11px;
}

.knowledge-category-head .module-table-actions {
  justify-content: flex-end;
  gap: 5px;
}

.knowledge-category-head .table-icon-button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.knowledge-items-list {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
}

.knowledge-items-list::before {
  content: attr(data-description);
  display: block;
  color: #9fb0bc;
  font-size: 12px;
  line-height: 1.35;
  padding: 0 2px 4px;
}

.knowledge-item-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1.5fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.28);
}

.knowledge-item-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.knowledge-item-row p {
  min-width: 0;
  margin: 0;
  color: #dce8f2;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .knowledge-category-head {
    grid-template-columns: 28px minmax(120px, 1fr) auto auto;
  }

  .knowledge-category-head .module-status {
    display: none;
  }

  .knowledge-item-row {
    grid-template-columns: minmax(130px, 1fr) auto;
  }

  .knowledge-item-row p,
  .knowledge-item-row .module-status {
    display: none;
  }
}

.knowledge-empty {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.22);
}

.jarvis-open-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(0, 184, 148, 0.55);
  border-radius: 16px;
  background: radial-gradient(circle at 30% 20%, #17d6bd, #08665f 42%, #0b1b2b 100%);
  color: #65ffe1;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0, 184, 148, 0.12), 0 18px 34px rgba(0, 0, 0, 0.36);
}

body:not(.authenticated) .jarvis-open-button {
  display: none;
}

.jarvis-open-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #ecfffb;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jarvis-open-button:hover {
  border-color: rgba(101, 255, 225, 0.8);
  transform: translateY(-1px);
}

.jarvis-open-button.is-dragging {
  cursor: grabbing;
  transform: scale(1.03);
}

@media (max-width: 720px) {
  .jarvis-open-button {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}

.workspace-footer {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-toggle {
  justify-content: start;
  cursor: default;
}

.theme-toggle input {
  margin-left: auto;
  accent-color: #9ed0ff;
}

.workspace-module {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px;
  background: #111820;
}

.module-shell {
  display: grid;
  gap: 13px;
  max-width: 1180px;
  min-width: 0;
}

.calls-module-shell {
  max-width: min(1220px, 100%);
  gap: 10px;
}

.module-shell:has(.passive-actions-wrap) {
  max-width: min(1180px, 100%);
  width: 100%;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.module-header h1 {
  margin: 0;
  color: #9ed0ff;
  font-size: 24px;
}

.module-header p {
  margin: 3px 0 0;
  color: var(--muted);
}

.module-header > div {
  min-width: 0;
}

.module-primary {
  border: 0;
  border-radius: 999px;
  background: #9ed0ff;
  color: #06121e;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  justify-content: center;
}

.module-primary svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.module-primary.compact-primary {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.connections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 24px;
}

.connections-panel {
  border: 1px solid rgba(158, 208, 255, 0.18);
  border-radius: 8px;
  padding: 24px;
  background: #222b38;
}

.module-card {
  display: grid;
  gap: 12px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #263241;
  padding: 20px;
}

.module-card strong {
  font-size: 18px;
}

.module-card span,
.module-card p {
  margin: 0;
  color: #a8b5bf;
}

.connection-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  min-height: 196px;
  border: 0;
  border-radius: 8px;
  background: #333d4e;
  padding: 20px 8px 8px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.28);
}

.connection-empty-state {
  display: grid;
  gap: 6px;
  min-height: 120px;
  align-content: center;
  border: 1px dashed rgba(158, 208, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 17, 26, 0.26);
  padding: 22px;
  color: #c8d6e2;
}

.connection-empty-state strong {
  color: #f5fbff;
  font-size: 15px;
}

.connection-empty-state span {
  color: #93a4b2;
  font-size: 13px;
}

.connection-card-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  gap: 16px;
  align-items: start;
  padding: 0 14px;
}

.connection-whatsapp-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #25d366;
}

.connection-whatsapp-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.connection-card-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.connection-card-text strong {
  overflow: hidden;
  color: #f5fbff;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-card-text span {
  color: #b8c4ce;
  font-size: 14px;
}

.connection-menu-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.connection-menu-button span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f0f6fb;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 32px;
  margin-left: 14px;
  border: 1px solid rgba(91, 205, 112, 0.72);
  border-radius: 999px;
  color: #6cdc78;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
}

.connection-status::before {
  content: "✓";
  margin-right: 7px;
  font-size: 16px;
}

.connection-status.is-qr::before,
.connection-status.is-pending::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.connection-status.is-qr,
.connection-status.is-pending {
  border-color: rgba(158, 208, 255, 0.55);
  color: #9ed0ff;
}

.connection-error {
  padding: 0 14px;
  color: #ffb4b4 !important;
  font-size: 13px;
}

.connection-edit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: end;
  width: 100%;
  min-height: 41px;
  border: 0;
  border-radius: 7px;
  background: #697180;
  color: #f5fbff;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.connection-edit-button:disabled {
  cursor: default;
  opacity: 0.86;
}

.connection-edit-button span:last-child {
  font-size: 28px;
  line-height: 1;
}

.connection-menu {
  position: absolute;
  top: 52px;
  right: 16px;
  z-index: 3;
  display: grid;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d2632;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.connection-menu[hidden] {
  display: none;
}

.connection-menu button {
  border: 0;
  background: transparent;
  color: #f5fbff;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.connection-menu button:hover {
  background: rgba(158, 208, 255, 0.1);
}

.connection-menu button:disabled {
  cursor: not-allowed;
  color: #7e8a94;
}

.connection-status,
.connection-card .module-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  line-height: 1;
}

.connection-status::before,
.connection-card .module-status::before {
  content: "\2713";
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.module-status {
  width: max-content;
  border: 1px solid rgba(95, 220, 128, 0.58);
  border-radius: 999px;
  color: #6cdc78;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
}

.module-status.status-warning {
  border-color: rgba(255, 196, 87, 0.7);
  color: #ffd36a;
  background: rgba(255, 196, 87, 0.08);
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(360px, 640px);
  gap: 14px;
  align-items: start;
}

.account-profile-card,
.account-bot-card {
  display: grid;
  gap: 0;
}

.account-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

.account-bot-card p {
  margin: 0;
  padding: 12px;
  color: #dce8f2;
  font-size: 13px;
  line-height: 1.45;
}

.account-bot-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 12px 0;
}

.account-bot-metrics span {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 8px;
  background: rgba(12, 19, 29, 0.38);
  padding: 10px;
}

.account-bot-metrics strong {
  color: #18d5b5;
  font-size: 20px;
  line-height: 1;
}

.account-bot-metrics small,
.account-bot-note {
  color: var(--muted);
  font-size: 11px;
}

.account-bot-actions {
  padding: 0 12px 12px;
}

.account-bot-note {
  display: block;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px 12px;
}

@media (max-width: 860px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.module-list {
  display: grid;
  gap: 10px;
}

.module-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(160px, 190px) minmax(160px, 190px) minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
}

.contacts-toolbar {
  grid-template-columns: minmax(140px, 210px) minmax(140px, 190px) minmax(140px, 190px) minmax(170px, 1fr) minmax(180px, 265px) auto;
  gap: 8px;
  max-width: 1180px;
}

.module-toolbar-single {
  grid-template-columns: minmax(260px, 420px);
}

.assignment-toolbar {
  max-width: 880px;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 180px) minmax(130px, 150px);
  gap: 10px;
}

.module-toolbar select,
.module-search,
.contact-tag-filter-toggle {
  height: 32px;
  border: 1px solid rgba(158, 208, 255, 0.13);
  border-radius: 16px;
  background: #263241;
  color: var(--text);
}

.module-toolbar select {
  min-width: 0;
  padding: 0 12px;
  outline: 0;
  font-size: 12px;
}

.module-search {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  padding: 0 12px;
}

.module-search-inline {
  width: min(320px, 100%);
}

.module-search span {
  color: var(--muted);
}

.module-search .search-icon {
  display: grid;
  place-items: center;
}

.module-search .search-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.contact-tag-filter {
  position: relative;
  min-width: 0;
}

.contact-tag-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.contact-tag-filter-toggle span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-tag-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 2px;
  width: min(280px, 80vw);
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202a38;
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.contact-tag-filter-menu[hidden] {
  display: none;
}

.contact-tag-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  height: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 4px;
  color: var(--muted);
}

.contact-tag-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.contact-tag-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  border-radius: 6px;
  padding: 5px 7px;
  cursor: pointer;
}

.contact-tag-option:hover {
  background: rgba(158, 208, 255, 0.09);
}

.contact-tag-option span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.contact-tag-option i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.contact-export-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.contact-export-actions button {
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: #9ed0ff;
  color: #06121e;
  padding: 0 9px;
  cursor: pointer;
  font-weight: 800;
  font-size: 11px;
}

.module-inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 80px auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c2633;
  padding: 12px;
}

.tags-editor-panel.is-collapsed,
.tags-inline-form.is-collapsed {
  display: none;
}

.tags-toolbar {
  max-width: 820px;
  align-items: center;
  gap: 10px;
}

.tags-toolbar .module-search {
  width: min(320px, 100%);
}

.module-chip-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  border: 1px solid rgba(158, 208, 255, 0.24);
  border-radius: 999px;
  background: #152331;
  color: #eaf5ff;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.module-chip-action:hover {
  border-color: rgba(158, 208, 255, 0.5);
  background: #1b2b3a;
}

.module-chip-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.tags-editor-panel {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(180px, 1fr) minmax(150px, 210px) 44px 40px;
  align-items: center;
  gap: 9px;
  max-width: 820px;
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 9px;
  background: linear-gradient(180deg, #16212c, #111a23);
}

.tag-category-editor {
  grid-template-columns: minmax(150px, 220px) minmax(220px, 1fr) 44px 40px;
}

.tag-admin-section {
  max-width: 820px;
  margin: 0 0 14px;
}

.tag-admin-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(158, 208, 255, 0.12);
  color: #eef6ff;
}

.tag-admin-section > header strong {
  font-size: 13px;
}

.tag-admin-section > header span {
  min-width: 24px;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 999px;
  background: #152230;
  color: #9ed0ff;
  padding: 2px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.tags-editor-panel > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tags-editor-panel strong {
  color: #f3f8ff;
  font-size: 13px;
}

.tags-editor-panel span {
  overflow: hidden;
  color: #8fa5b8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags-editor-panel input,
.tags-editor-panel select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1821;
  color: var(--text);
  padding: 0 10px;
  outline: 0;
}

.tags-editor-panel input[type="color"] {
  width: 44px;
  padding: 3px;
}

.tags-editor-panel .icon-only-button {
  display: grid;
  width: 40px;
  height: 36px;
  min-width: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: #00a884;
  color: #04120f;
  padding: 0;
}

.tag-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 820px;
  margin: 0;
}

.tag-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--tag-color) 65%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color) 14%, #111820);
  color: #eef8ff;
  padding: 4px 7px 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.tag-category-pill i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--tag-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag-color) 18%, transparent);
}

.tag-category-pill button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  padding: 0;
}

.tag-category-pill button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.tag-category-pill svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tag-empty-row {
  border: 1px dashed rgba(158, 208, 255, 0.18);
  border-radius: 8px;
  background: rgba(15, 24, 33, 0.7);
  color: #8fa5b8;
  padding: 10px 12px;
  font-size: 12px;
}

.module-inline-form input,
.module-table select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #151e27;
  color: var(--text);
  padding: 8px 10px;
}

.tags-inline-form input[type="color"] {
  width: 42px;
  height: 36px;
  padding: 3px;
}

.tags-inline-form .icon-only-button {
  width: 42px;
  height: 36px;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: #00a884;
  color: #04120f;
  padding: 0;
}

.module-inline-form button,
.module-table button {
  border: 0;
  border-radius: 7px;
  background: #9ed0ff;
  color: #06121e;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.module-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #263241;
}

.contacts-table-wrap {
  background: linear-gradient(180deg, #2a3546, #263241);
}

.assignments-table-wrap {
  max-width: 880px;
}

.module-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.module-table th,
.module-table td {
  padding: 8px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  text-align: left;
  vertical-align: middle;
}

.module-table th {
  color: #dce9ef;
  font-size: 13px;
}

.module-table td {
  color: var(--text);
}

.module-table td:nth-child(2),
.module-table td:nth-child(3) {
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags-table-wrap {
  max-width: 820px;
  background: linear-gradient(180deg, #223040, #1d2937);
}

.tags-table {
  min-width: 560px;
}

.tags-table th,
.tags-table td {
  padding: 9px 13px;
}

.tags-table th {
  background: #243244;
  color: #f2f7fb;
  font-size: 12px;
}

.tags-table tbody tr:nth-child(even) {
  background: rgba(42, 54, 70, 0.82);
}

.tags-table tbody tr:hover {
  background: rgba(64, 81, 104, 0.9);
}

.tag-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tag-color-bar {
  display: inline-block;
  width: 74px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.table-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tags-table .table-icon-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent !important;
  color: #f4f8fb;
  cursor: pointer;
  padding: 0 !important;
}

.tags-table .table-icon-actions button:hover {
  background: rgba(158, 208, 255, 0.14);
}

.tags-table .table-icon-actions button:last-child:hover {
  color: #ff6b6b;
}

.table-icon-actions svg,
.icon-only-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-only-button svg path,
.table-icon-actions svg path {
  fill: none !important;
}

.assignments-table {
  min-width: 720px;
  table-layout: fixed;
}

.assignments-table th,
.assignments-table td {
  padding: 10px 14px;
}

.assignments-table th:nth-child(1),
.assignments-table td:nth-child(1) {
  width: 29%;
}

.assignments-table th:nth-child(2),
.assignments-table td:nth-child(2) {
  width: 22%;
}

.assignments-table th:nth-child(3),
.assignments-table td:nth-child(3) {
  width: 29%;
}

.assignments-table th:nth-child(4),
.assignments-table td:nth-child(4) {
  width: 20%;
}

.assignments-table td {
  height: 52px;
}

.assignments-table td:last-child {
  display: table-cell;
}

.assignments-table select {
  width: min(150px, 100%);
}

.reports-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  align-items: center;
  max-width: 1220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b2532;
  padding: 8px;
}

.reports-toolbar select,
.reports-date,
.reports-date input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #263241;
  color: var(--text);
}

.reports-toolbar select {
  padding: 0 11px;
  outline: 0;
}

.reports-date {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 0 10px;
}

.reports-date span {
  color: #9fb0bd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.reports-date input {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color-scheme: dark;
  outline: 0;
  padding: 0;
}

.reports-search {
  width: 100%;
  height: 34px;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.reports-time-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-kpi {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 86px;
  overflow: hidden;
  border: 1px solid rgba(158, 208, 255, 0.15);
  border-left: 3px solid #9ed0ff;
  border-radius: 8px;
  background: #263241;
  padding: 12px 12px 10px;
}

.report-kpi strong {
  color: #f5fbff;
  font-size: 20px;
  line-height: 1;
}

.report-kpi p,
.report-kpi small {
  margin: 0;
  color: #b9c7d0;
  font-size: 12px;
}

.report-kpi small {
  color: #8193a1;
}

.report-kpi-icon {
  position: absolute;
  right: 11px;
  top: 13px;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 6px;
  color: #9ed0ff;
  opacity: 0.95;
}

.report-kpi-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tone-green {
  border-left-color: #32d66b;
}

.tone-green .report-kpi-icon {
  color: #32d66b;
}

.tone-blue {
  border-left-color: #2f9cff;
}

.tone-blue .report-kpi-icon {
  color: #2f9cff;
}

.tone-orange {
  border-left-color: #ff9f1a;
}

.tone-orange .report-kpi-icon {
  color: #ff9f1a;
}

.tone-red {
  border-left-color: #ff4d4d;
}

.tone-red .report-kpi-icon {
  color: #ff4d4d;
}

.tone-pink {
  border-left-color: #ff7ab8;
}

.tone-pink .report-kpi-icon {
  color: #ff7ab8;
}

.tone-cyan {
  border-left-color: #26d9d0;
}

.tone-cyan .report-kpi-icon {
  color: #26d9d0;
}

.reports-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 10px;
}

.report-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #263241;
  padding: 12px;
}

.report-chart-panel {
  grid-row: span 2;
}

.report-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.report-panel header strong {
  color: #e9f3f8;
  font-size: 14px;
}

.report-panel header span {
  color: #9fb0bd;
  font-size: 12px;
}

.report-interest-panel {
  display: grid;
  gap: 12px;
}

.report-interest-panel header > div:first-child {
  display: grid;
  gap: 2px;
}

.report-export-actions {
  display: inline-flex;
  gap: 6px;
}

.report-export-actions button {
  min-height: 28px;
  border: 1px solid rgba(158, 208, 255, 0.28);
  border-radius: 999px;
  background: #10202b;
  color: #bfe1ff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  padding: 0 10px;
}

.interest-range-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.interest-range-card {
  display: grid;
  gap: 2px;
  min-height: 56px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: #1b2733;
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.interest-range-card strong {
  color: #f5fbff;
  font-size: 19px;
  line-height: 1;
}

.interest-range-card span {
  color: #9fb0bd;
  font-size: 11px;
  font-weight: 800;
}

.interest-range-card.tone-cold {
  border-left: 3px solid #9aa6af;
}

.interest-range-card.tone-low {
  border-left: 3px solid #76a9ff;
}

.interest-range-card.tone-medium {
  border-left: 3px solid #f2c94c;
}

.interest-range-card.tone-high {
  border-left: 3px solid #ff9f1a;
}

.interest-range-card.tone-closing {
  border-left: 3px solid #32d66b;
}

.interest-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.interest-group-grid > section {
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 8px;
  background: #202d3a;
  padding: 9px;
}

.interest-group-grid > section > strong {
  display: block;
  margin-bottom: 7px;
  color: #bfe1ff;
  font-size: 12px;
}

.interest-mini-groups {
  display: grid;
  gap: 5px;
}

.interest-mini-groups div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  border-radius: 7px;
  background: #17232e;
  padding: 7px 8px;
}

.interest-mini-groups span,
.interest-mini-groups small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interest-mini-groups span {
  color: #e9f3f8;
  font-size: 12px;
  font-weight: 800;
}

.interest-mini-groups b {
  color: var(--accent);
  font-size: 13px;
}

.interest-mini-groups small {
  grid-column: 1 / -1;
  color: #8193a1;
  font-size: 10.5px;
}

.interest-report-table-wrap {
  max-height: 390px;
}

.interest-report-table th,
.interest-report-table td {
  font-size: 11.5px;
}

.interest-report-table td strong,
.interest-report-table td small {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interest-report-table td small {
  color: #9fb0bd;
  font-size: 10.5px;
  margin-top: 2px;
}

.report-chart {
  min-height: 210px;
}

.report-chart svg {
  display: block;
  width: 100%;
  height: 190px;
  border-radius: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 38px,
    #202a38;
}

.report-chart-fill {
  fill: rgba(75, 190, 147, 0.22);
  stroke: none;
}

.report-chart-line {
  fill: none;
  stroke: #9ed0ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.report-chart circle {
  fill: #9ed0ff;
  stroke: #263241;
  stroke-width: 2;
}

.report-chart-labels {
  display: flex;
  justify-content: space-between;
  color: #91a2af;
  font-size: 11px;
  padding: 5px 3px 0;
}

.report-agent-list,
.report-bars {
  display: grid;
  gap: 7px;
}

.report-agent-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) repeat(4, minmax(48px, auto));
  gap: 8px;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #c9d5dd;
  font-size: 12px;
}

.report-agent-row:last-child {
  border-bottom: 0;
}

.report-agent-row strong {
  overflow: hidden;
  color: #f5fbff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 145px) minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  color: #d5e0e7;
  font-size: 12px;
}

.report-bar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bar-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.report-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #9ed0ff;
}

.report-bar-row strong {
  text-align: right;
}

.report-empty {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.report-kanban-panel {
  max-width: 1180px;
}

.report-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.report-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 170px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-top: 3px solid #9ed0ff;
  border-radius: 8px;
  background: #202a38;
  padding: 9px;
}

.report-stage.stage-green {
  border-top-color: #32d66b;
}

.report-stage.stage-blue {
  border-top-color: #2f9cff;
}

.report-stage.stage-orange {
  border-top-color: #ff9f1a;
}

.report-stage.stage-red {
  border-top-color: #ff4d4d;
}

.report-stage.stage-pink {
  border-top-color: #ff7ab8;
}

.report-stage header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: start;
  margin: 0 0 8px;
}

.report-stage header strong,
.report-stage header span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-stage header strong {
  color: #f5fbff;
  font-size: 13px;
}

.report-stage header span {
  color: #91a2af;
  font-size: 11px;
}

.report-stage header b {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  background: rgba(158, 208, 255, 0.12);
  color: #dff1ff;
  font-size: 12px;
}

.report-stage-list {
  display: grid;
  gap: 7px;
  align-content: start;
}

.report-stage-card {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(7, 16, 22, 0.48);
  padding: 8px;
}

.report-stage-card strong,
.report-stage-card span,
.report-stage-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-stage-card strong {
  color: #f5fbff;
  font-size: 12px;
}

.report-stage-card span,
.report-stage-card small {
  color: #91a2af;
  font-size: 11px;
}

.report-stage-card p {
  margin: 2px 0 0;
  color: #d2dee5;
  font-size: 12px;
}

.report-stage-card footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.report-stage-card em {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 168, 132, 0.16);
  color: #70e5c7;
  padding: 2px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-stage-empty,
.report-stage-more {
  margin: 0;
  color: #8193a1;
  font-size: 12px;
}

.campaign-form,
.campaign-box,
.campaign-targets,
.campaign-list {
  display: grid;
  gap: 10px;
}

.campaign-form {
  max-width: 1180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b2532;
  padding: 12px;
}

.campaign-line-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 1180px;
  margin-bottom: 8px;
}

.campaign-line-status,
.campaign-selected-line-status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 999px;
  background: #14202c;
  color: #dce9f5;
}

.campaign-line-status {
  gap: 6px;
  max-width: 220px;
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.campaign-selected-line-status {
  gap: 5px;
  width: max-content;
  min-height: 22px;
  margin-top: 2px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 900;
}

.campaign-line-status i,
.campaign-selected-line-status i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d8b98;
  box-shadow: 0 0 0 3px rgba(125, 139, 152, 0.12);
}

.campaign-line-status strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-line-status em,
.campaign-selected-line-status em {
  flex: 0 0 auto;
  color: #91a6b6;
  font-style: normal;
}

.campaign-line-status.is-ready,
.campaign-selected-line-status.is-ready {
  border-color: rgba(0, 168, 132, 0.42);
  background: rgba(0, 168, 132, 0.1);
}

.campaign-line-status.is-ready i,
.campaign-selected-line-status.is-ready i {
  background: #00c48c;
  box-shadow: 0 0 0 3px rgba(0, 196, 140, 0.14);
}

.campaign-line-status.is-loading,
.campaign-line-status.is-qr,
.campaign-selected-line-status.is-loading,
.campaign-selected-line-status.is-qr {
  border-color: rgba(158, 208, 255, 0.36);
  background: rgba(158, 208, 255, 0.1);
}

.campaign-line-status.is-loading i,
.campaign-line-status.is-qr i,
.campaign-selected-line-status.is-loading i,
.campaign-selected-line-status.is-qr i {
  background: #9ed0ff;
  box-shadow: 0 0 0 3px rgba(158, 208, 255, 0.14);
}

.campaign-line-status.is-error,
.campaign-selected-line-status.is-error {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.1);
}

.campaign-line-status.is-error i,
.campaign-selected-line-status.is-error i {
  background: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14);
}

.campaign-line-empty {
  color: #91a6b6;
  font-size: 12px;
}

.campaign-form-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(170px, 1.2fr) minmax(150px, 1fr) 40px minmax(120px, 0.8fr) minmax(170px, 1fr);
  gap: 9px;
}

.campaign-line-field {
  align-content: start;
}

.ai-campaign-main-row {
  grid-template-columns: minmax(130px, 0.8fr) minmax(170px, 1.1fr) repeat(3, minmax(120px, 0.9fr)) minmax(115px, 0.7fr) minmax(170px, 1fr);
}

.ai-campaign-message {
  gap: 10px;
}

.ai-campaign-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 9px;
}

.campaign-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 9px;
}

.campaign-form label,
.campaign-box label,
.campaign-targets label {
  display: grid;
  gap: 5px;
  color: #9fb0bd;
  font-size: 12px;
  font-weight: 700;
}

.campaign-form input,
.campaign-form select,
.campaign-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
  color: var(--text);
  padding: 8px 10px;
  outline: 0;
}

.campaign-check {
  align-self: end;
  display: flex !important;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
  padding: 0 10px;
}

.campaign-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(7, 16, 22, 0.35);
}

.campaign-box header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.campaign-box button,
.campaign-actions button,
.campaign-card-actions button {
  border: 0;
  border-radius: 7px;
  background: #9ed0ff;
  color: #06121e;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.campaign-template-manage {
  align-self: end;
  width: 38px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #15212d;
  color: #dcefff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.campaign-template-manage svg,
.campaign-template-row button svg,
.campaign-template-message button svg,
.campaign-card-actions button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.campaign-timing-modal {
  width: min(560px, calc(100vw - 28px));
}

.campaign-timing-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.campaign-timing-form .wide-field {
  grid-column: 1 / -1;
}

.campaign-timing-form label {
  display: grid;
  gap: 5px;
  color: #9fb0bd;
  font-size: 12px;
  font-weight: 800;
}

.campaign-timing-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101922;
  color: var(--text);
  padding: 9px 10px;
}

.campaign-timing-units {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: -6px;
  color: #7f93a3;
  font-size: 11px;
}

.campaign-messages {
  display: grid;
  gap: 8px;
}

.campaign-message-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 8px;
}

.campaign-message-editor small {
  grid-column: 1 / -1;
  color: #8ea3b5;
  font-size: 11px;
}

.campaign-rules label {
  grid-template-columns: minmax(0, 1fr) 72px auto;
  align-items: center;
}

.campaign-targets {
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.7fr);
}

.campaign-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 170px;
  overflow: auto;
  padding: 4px 0;
}

.campaign-tags label {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 8px;
}

.campaign-tags span {
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #9ed0ff;
  padding: 2px 7px;
}

.campaign-tag-help {
  margin: 4px 0 8px;
  color: #91a2af;
  font-size: 12px;
}

.campaign-smart-filters {
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.24);
}

.campaign-smart-filters summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.campaign-smart-filters > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.campaign-smart-filters label {
  gap: 4px;
  min-width: 0;
  font-size: 11px;
}

.campaign-smart-filters input,
.campaign-smart-filters select {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.campaign-recipient-count {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(0, 168, 132, 0.14);
  color: #62e5c4;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
}

.campaign-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.campaign-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.campaign-actions button svg,
.ai-campaign-preview button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-safety-check {
  margin: 8px 0;
}

.ai-segment-template-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  margin-top: 9px;
}

.ai-segment-template-tools select,
.ai-segment-template-tools button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
  color: var(--text);
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 800;
}

.ai-segment-template-tools button {
  background: #15212d;
  color: #9ed0ff;
  cursor: pointer;
}

.ai-campaign-preview {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(7, 16, 22, 0.3);
  padding: 10px;
}

.ai-campaign-preview header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ai-campaign-preview header div {
  display: grid;
  gap: 2px;
}

.ai-campaign-preview header span {
  color: #91a2af;
  font-size: 12px;
}

.ai-campaign-preview button {
  width: auto;
  min-width: 92px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: #9ed0ff;
  color: #06121e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.ai-campaign-preview-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 6px;
}

.ai-campaign-preview-summary span {
  display: grid;
  gap: 2px;
  min-height: 42px;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 8px;
  background: #14212b;
  color: #8ea3b5;
  padding: 7px 9px;
  font-size: 10.5px;
}

.ai-campaign-preview-summary b {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.ai-risk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid #f2c94c;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px 10px;
}

.ai-risk-row strong,
.ai-risk-row span,
.ai-risk-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-risk-row span {
  color: #8ea3b5;
  font-size: 12px;
}

.ai-risk-row small {
  margin-top: 2px;
  color: #b8c6cc;
  font-size: 11px;
}

.ai-risk-row em {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(242, 201, 76, 0.14);
  color: #f8d56d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.ai-risk-low {
  border-left-color: #62e5c4;
}

.ai-risk-low em {
  background: rgba(0, 168, 132, 0.14);
  color: #62e5c4;
}

.ai-risk-high {
  border-left-color: #ff7b7b;
}

.ai-risk-high em {
  background: rgba(255, 123, 123, 0.13);
  color: #ff9a9a;
}

.campaign-history-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px auto;
  gap: 8px;
  align-items: end;
  max-width: 1180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 7px 10px;
}

.campaign-history-tools div,
.campaign-history-tools label {
  display: grid;
  gap: 4px;
}

.campaign-history-tools span,
.campaign-history-tools label {
  color: var(--muted);
  font-size: 12px;
}

.campaign-history-tools input {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111820;
  color: var(--text);
  padding: 0 9px;
}

.campaign-history-tools button {
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: #15212d;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0 10px;
}

.campaign-card {
  display: grid;
  gap: 5px;
  max-width: 1180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #263241;
  padding: 8px 12px;
}

.campaign-card header,
.campaign-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.campaign-card header {
  min-height: 34px;
}

.campaign-card header strong {
  display: block;
}

.campaign-card header span,
.campaign-card footer,
.campaign-card p {
  color: #9fb0bd;
  font-size: 12px;
}

.campaign-card-meta {
  min-width: 92px;
  border-radius: 8px;
  background: rgba(0, 168, 132, 0.12);
  color: #83f2d4;
  padding: 4px 8px;
  text-align: right;
}

.campaign-card-meta strong {
  color: #a9ffe8;
  font-size: 15px;
  line-height: 1;
}

.campaign-card-meta span {
  display: block;
  color: #9fb0bd;
  font-size: 11px;
}

.campaign-card-schedule {
  margin: -3px 0 0;
  line-height: 1.2;
}

.campaign-card-schedule span {
  display: inline-block;
  margin-left: 8px;
  color: #7edbc8;
  font-size: 11px;
}

.campaign-card-actions {
  display: flex;
  gap: 6px;
}

.campaign-card-actions button:nth-child(n+2) {
  background: #18242d;
  color: var(--text);
}

.campaign-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.campaign-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a884, #9ed0ff);
}

.campaign-card footer {
  font-size: 11px;
  line-height: 1.15;
}

.campaign-template-modal {
  width: min(940px, calc(100vw - 28px));
  overflow: hidden;
}

.campaign-template-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(158, 208, 255, 0.035), rgba(7, 16, 22, 0));
}

.campaign-template-form label,
.campaign-template-message label {
  display: grid;
  gap: 5px;
  color: #9fb0bd;
  font-size: 12px;
  font-weight: 700;
}

.campaign-template-form input,
.campaign-template-form select,
.campaign-template-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
  color: var(--text);
  padding: 8px 10px;
  outline: 0;
}

.campaign-template-form .wide-field {
  grid-column: 1 / -1;
}

.campaign-template-form > .confirm-modal-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.campaign-template-editor {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111a24;
  padding: 10px;
}

.campaign-template-editor header,
.campaign-template-row,
.campaign-template-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-template-editor header {
  justify-content: space-between;
}

.campaign-template-editor header strong {
  font-size: 14px;
}

#campaignTemplateMessages {
  display: grid;
  gap: 8px;
  max-height: 290px;
  overflow: auto;
  padding-right: 4px;
}

.campaign-template-message {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) 34px;
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 8px;
}

.campaign-template-message textarea {
  min-height: 78px;
}

.campaign-template-message small {
  grid-column: 1 / -1;
  color: #8ea3b5;
  font-size: 11px;
}

.campaign-template-message button,
.campaign-template-row button {
  border: 0;
  border-radius: 7px;
  background: #10202b;
  color: #e7f2ff;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.campaign-template-message input[type="file"] {
  max-width: 100%;
  font-size: 11px;
}

.campaign-template-list {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow: auto;
  padding: 12px 14px 14px;
  background: #0f171f;
}

.campaign-template-row {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #182432;
  padding: 8px;
}

.campaign-template-row > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.campaign-template-row strong,
.campaign-template-row span {
  display: block;
}

.campaign-template-row span,
.campaign-template-empty {
  color: #9fb0bd;
  font-size: 12px;
}

.ai-settings-modal {
  width: min(620px, calc(100vw - 28px));
}

.ai-settings-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  padding: 14px;
}

.ai-settings-form .wide-field {
  grid-column: 1 / -1;
}

.ai-settings-form label {
  display: grid;
  gap: 5px;
  color: #9fb0bd;
  font-size: 12px;
  font-weight: 800;
}

.ai-settings-form input,
.ai-settings-form select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
  color: var(--text);
  padding: 9px 10px;
  outline: 0;
}

.ai-settings-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.conversation-summary-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 44px));
}

.conversation-voice-modal {
  width: min(620px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 44px));
}

.conversation-summary-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 16px;
}

.conversation-voice-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.voice-draft-controls {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(158, 208, 255, 0.13);
  border-radius: 12px;
  background: rgba(16, 27, 37, 0.58);
  padding: 12px;
}

.voice-draft-controls label {
  display: grid;
  gap: 6px;
  color: #9fb0bc;
  font-size: 12px;
  font-weight: 700;
}

.voice-draft-controls .wide-field {
  grid-column: 1 / -1;
}

.voice-draft-controls select,
.voice-draft-controls textarea {
  width: 100%;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 9px;
  background: #0d1720;
  color: #eef7fb;
  padding: 9px 10px;
  font: inherit;
}

.voice-draft-controls textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.35;
}

.voice-draft-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: #9ed0ff;
  color: #06131c;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.voice-draft-controls > button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-loading,
.summary-error,
.summary-empty {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 10px;
  background: rgba(16, 27, 37, 0.72);
  color: #d8e6ee;
  padding: 18px;
}

.summary-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(158, 208, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: summarySpin 0.9s linear infinite;
}

.summary-loading small,
.summary-meta {
  color: #9fb0bc;
  font-size: 12px;
}

.summary-meta {
  border: 1px solid rgba(0, 168, 132, 0.22);
  border-radius: 999px;
  background: rgba(0, 168, 132, 0.08);
  justify-self: start;
  padding: 6px 10px;
}

.summary-sections,
.summary-compact {
  display: grid;
  gap: 8px;
}

.summary-score-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(120px, 0.7fr) minmax(180px, 1.4fr);
  gap: 8px;
}

.summary-score-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.13);
  border-radius: 10px;
  background: #101b25;
  padding: 10px 12px;
}

.summary-score-card span {
  color: #8fa2af;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-score-card strong {
  overflow: hidden;
  color: #eef9ff;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.summary-compact {
  border: 1px solid rgba(158, 208, 255, 0.13);
  border-radius: 10px;
  background: #121d28;
  padding: 12px 14px;
}

.summary-compact p {
  position: relative;
  display: flex;
  gap: 5px;
  align-items: flex-start;
  color: #ecf6fb;
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

.summary-compact strong {
  flex: 0 0 auto;
  color: #9ed0ff;
}

.summary-compact span {
  min-width: 0;
}

.summary-suggested-row {
  padding-right: 34px;
}

.summary-suggested-row button {
  position: absolute;
  right: 0;
  top: -3px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(158, 208, 255, 0.13);
  color: #dff3ff;
  cursor: pointer;
}

.summary-suggested-row button:hover {
  background: rgba(0, 168, 132, 0.2);
  color: #67f0cb;
}

.summary-suggested-row button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-summary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.ai-summary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 9px;
  background: #102235;
  color: #dff1ff;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.ai-summary-button:hover,
.ai-summary-button:focus-visible {
  border-color: rgba(0, 168, 132, 0.5);
  background: rgba(0, 168, 132, 0.18);
  color: #7af3d4;
}

.ai-summary-button svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crm-mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.crm-mini-kpis article {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 8px;
  background: #111c27;
  padding: 10px 12px;
}

.crm-mini-kpis strong {
  color: #14d7b8;
  font-size: 18px;
}

.crm-mini-kpis span {
  color: #9fb0bc;
  font-size: 11px;
}

.crm-compact-tools {
  margin-bottom: 12px;
}

.crm-task-table td:first-child,
.crm-task-table td:nth-child(2) {
  max-width: 280px;
}

.crm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.crm-badge.tone-urgent {
  background: rgba(255, 92, 122, 0.16);
  color: #ff8aa3;
}

.crm-badge.tone-high {
  background: rgba(255, 190, 76, 0.16);
  color: #ffd27b;
}

.crm-badge.tone-normal {
  background: rgba(20, 184, 166, 0.16);
  color: #35e0c2;
}

.crm-badge.tone-low {
  background: rgba(158, 208, 255, 0.14);
  color: #a9d7ff;
}

.agenda-calendar-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 2px;
}

.agenda-calendar-strip button,
.agenda-calendar-strip span {
  display: grid;
  gap: 2px;
  min-width: 96px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: #101b25;
  color: #dcebf5;
  padding: 8px 10px;
  text-align: left;
}

.agenda-calendar-strip button {
  cursor: pointer;
}

.agenda-calendar-strip button.active,
.agenda-calendar-strip button:hover {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(20, 184, 166, 0.12);
}

.agenda-calendar-strip strong {
  font-size: 13px;
}

.agenda-calendar-strip span {
  min-width: 180px;
  color: #9fb0bc;
  font-size: 12px;
}

.agenda-calendar-strip button span {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #9fb0bc;
  padding: 0;
  font-size: 11px;
}

.crm-edit-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
}

.crm-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 0;
}

.crm-edit-form label {
  display: grid;
  gap: 6px;
  color: #9fb0bc;
  font-size: 12px;
  font-weight: 800;
}

.crm-edit-form input,
.crm-edit-form select,
.crm-edit-form textarea {
  width: 100%;
  border: 1px solid rgba(158, 208, 255, 0.2);
  border-radius: 8px;
  background: #0f1822;
  color: var(--text);
  padding: 9px 10px;
  outline: 0;
}

.crm-edit-form .wide-field {
  grid-column: 1 / -1;
}

.appointment-reminder-options {
  display: grid;
  grid-template-columns: auto auto minmax(150px, 1fr);
  align-items: end;
  gap: 10px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 9px;
  background: #0c1620;
  padding: 10px;
}

.appointment-reminder-options strong {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 12px;
}

.appointment-reminder-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.appointment-reminder-options label:last-child {
  display: grid;
  gap: 5px;
}

.appointment-reminder-options input[type="checkbox"] {
  width: auto;
}

.crm-edit-form > .confirm-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 -14px;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
}

.crm-conversation-picker {
  position: relative;
}

.crm-selected-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: rgba(16, 27, 37, 0.82);
  color: #dcebf5;
  padding: 7px 10px;
}

.crm-selected-contact span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-selected-contact button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 92, 122, 0.16);
  color: #ffb2c0;
  cursor: pointer;
}

.crm-conversation-results {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  display: grid;
  gap: 4px;
  max-height: 248px;
  overflow: auto;
  border: 1px solid rgba(158, 208, 255, 0.22);
  border-radius: 10px;
  background: #0d1620;
  padding: 6px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.crm-conversation-results button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eef8ff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.crm-conversation-results button:hover {
  background: rgba(20, 184, 166, 0.12);
}

.crm-conversation-results strong,
.crm-conversation-results span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-conversation-results span,
.crm-conversation-results p {
  color: #9fb0bc;
  font-size: 12px;
}

@media (max-width: 720px) {
  .crm-mini-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-edit-form {
    grid-template-columns: 1fr;
  }

  .appointment-reminder-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .summary-score-card {
    grid-template-columns: 1fr;
  }
}

.voice-draft-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, #142231, #101923);
  padding: 14px;
}

.voice-draft-card label {
  display: grid;
  gap: 7px;
  color: #9fb0bc;
  font-size: 12px;
  font-weight: 700;
}

.voice-draft-card textarea {
  min-height: 92px;
  resize: vertical;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 10px;
  background: #0d1720;
  color: #eef7fb;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.voice-draft-card audio {
  width: 100%;
  height: 38px;
}

.voice-draft-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-draft-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #001f1a;
  padding: 7px 12px;
  font-weight: 800;
  cursor: pointer;
}

.voice-draft-actions .secondary-button {
  background: rgba(158, 208, 255, 0.11);
  color: #dff3ff;
}

.voice-draft-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-section {
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 10px;
  background: #121d28;
  padding: 12px 14px;
}

.summary-section h3 {
  color: #9ed0ff;
  font-size: 14px;
  margin: 0 0 6px;
}

.summary-section p {
  color: #ecf6fb;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

@keyframes summarySpin {
  to { transform: rotate(360deg); }
}

.ai-ready-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(158, 208, 255, 0.24);
  border-radius: 10px;
  background: rgba(158, 208, 255, 0.06);
  padding: 10px 12px;
}

.ai-ready-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ai-ready-card strong {
  color: #dff3ff;
  font-size: 14px;
}

.ai-ready-card span {
  color: #9fb0bd;
  font-size: 12px;
  line-height: 1.35;
}

.ai-ready-card::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffb86c;
  box-shadow: 0 0 0 4px rgba(255, 184, 108, 0.12);
}

.ai-ready-card.is-ready {
  border-color: rgba(0, 191, 166, 0.42);
  background: rgba(0, 191, 166, 0.08);
}

.ai-ready-card.is-ready::before {
  background: #00d6ae;
  box-shadow: 0 0 0 4px rgba(0, 214, 174, 0.14);
}

.ai-ready-card.is-error::before {
  background: #ff6b6b;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
}

.ai-ready-card.is-testing::before {
  background: #9ed0ff;
  box-shadow: 0 0 0 4px rgba(158, 208, 255, 0.14);
}

.compact-button {
  min-height: 30px !important;
  padding: 6px 12px !important;
}

.form-message.success {
  color: #8cf2db;
}

.quick-replies-table td:nth-child(2) {
  max-width: 640px;
}

.tag-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border-radius: 50%;
}

.module-tag {
  display: inline-grid;
  place-items: center;
  min-height: 19px;
  max-width: 96px;
  overflow: hidden;
  margin: 1px 3px 1px 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 6px;
  background: color-mix(in srgb, var(--tag-color, #00a884) 22%, transparent);
  color: color-mix(in srgb, var(--tag-color, #9ed0ff) 72%, white);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table td:nth-child(4) {
  white-space: normal;
}

.contacts-table {
  min-width: 980px;
  table-layout: fixed;
  font-size: 12px;
}

.contacts-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #30394b;
  color: #f2f7fb;
  font-size: 11px;
  line-height: 1.15;
  text-transform: none;
}

.contacts-table td {
  height: 42px;
  line-height: 1.2;
}

.contacts-table th,
.contacts-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 10px;
}

.contacts-table th:nth-child(1),
.contacts-table td:nth-child(1) {
  width: 20%;
}

.contacts-table th:nth-child(2),
.contacts-table td:nth-child(2) {
  width: 13%;
}

.contacts-table th:nth-child(3),
.contacts-table td:nth-child(3) {
  width: 8%;
}

.contacts-table th:nth-child(4),
.contacts-table td:nth-child(4) {
  width: 14%;
}

.contacts-table th:nth-child(5),
.contacts-table td:nth-child(5) {
  width: 14%;
}

.contacts-table th:nth-child(6),
.contacts-table td:nth-child(6) {
  width: 9%;
}

.contacts-table th:nth-child(7),
.contacts-table td:nth-child(7) {
  width: 10%;
}

.contacts-table th:nth-child(8),
.contacts-table td:nth-child(8) {
  width: 7%;
}

.contacts-table th:nth-child(9),
.contacts-table td:nth-child(9) {
  width: 58px;
  text-align: right;
}

.contacts-table td:nth-child(2),
.contacts-table td:nth-child(3),
.contacts-table td:nth-child(7),
.contacts-table td:nth-child(8),
.contacts-table td:nth-child(9) {
  white-space: nowrap;
}

.contacts-table td:nth-child(6),
.contacts-table td:nth-child(7) {
  max-width: 0;
}

.contacts-table td:nth-child(4),
.contacts-table td:nth-child(5) {
  white-space: normal;
}

.contacts-table td:nth-child(8) {
  font-size: 11px;
}

.contacts-table td:nth-child(9) {
  white-space: nowrap;
}

.contact-interest-pill {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 3px 7px;
  font-size: 11px;
}

.contacts-table tbody tr {
  background: rgba(36, 47, 62, 0.76);
}

.contacts-table tbody tr:nth-child(even) {
  background: rgba(42, 54, 70, 0.9);
}

.contacts-table tbody tr:hover {
  background: rgba(64, 81, 104, 0.9);
}

.contact-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.contact-name-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.contact-row-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #6d7781;
  color: #0b141a;
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
}

.contact-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.contact-row-actions button,
.contact-row-actions a {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #f4f8fb;
  cursor: pointer;
  text-decoration: none;
}

.contact-row-actions button:hover,
.contact-row-actions a:hover {
  background: rgba(158, 208, 255, 0.14);
}

.contact-row-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-row-actions a {
  color: #00e082;
}

.module-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #1c2633;
  padding: 14px 16px;
}

.settings-panel {
  display: grid;
  gap: 18px;
  width: min(640px, 100%);
}

.settings-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202a38;
}

.settings-row,
.settings-danger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 290px);
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.settings-card > :last-child {
  border-bottom: 0;
}

.settings-section-header {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 12px;
}

.settings-section-header strong {
  font-size: 15px;
}

.settings-section-header small {
  color: var(--muted);
  font-size: 12px;
}

.settings-hours-block {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 12px;
}

.settings-hours-block header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-hours-block header strong {
  display: block;
  font-size: 15px;
}

.settings-hours-block header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.settings-hour-row {
  display: grid;
  grid-template-columns: 18px 34px minmax(76px, 1fr) 16px minmax(76px, 1fr) 42px minmax(76px, 1fr) 16px minmax(76px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.13);
  border-radius: 8px;
  background: #172231;
  padding: 7px 8px;
}

.settings-hour-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.agent-hours-editor {
  display: grid;
  gap: 8px;
}

#agentBusinessHoursEditor {
  display: grid;
  gap: 6px;
}

.settings-hour-row strong {
  color: var(--text);
  font-size: 12px;
}

.settings-hour-row span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.settings-hour-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.settings-hour-row input[type="time"] {
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(158, 208, 255, 0.22);
  border-radius: 8px;
  background: #111b26;
  color: var(--text);
  padding: 0 8px;
  outline: 0;
}

.settings-row strong,
.settings-danger-row strong {
  display: block;
  font-size: 15px;
}

.settings-row small,
.settings-danger-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.settings-row select {
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(158, 208, 255, 0.28);
  border-radius: 10px;
  background: #2a3445;
  color: var(--text);
  padding: 0 14px;
  outline: 0;
}

.settings-row input,
.settings-row textarea {
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(158, 208, 255, 0.28);
  border-radius: 10px;
  background: #2a3445;
  color: var(--text);
  padding: 0 14px;
  outline: 0;
}

.settings-row textarea {
  height: auto;
  min-height: 74px;
  padding: 10px 14px;
  resize: vertical;
}

.settings-row-tall {
  align-items: start;
}

.settings-store-card header {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 12px;
}

.settings-store-card header strong {
  font-size: 15px;
}

.settings-store-card header small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.chatbot-dashboard {
  display: grid;
  gap: 14px;
}

.chatbot-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.chatbot-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chatbot-dashboard-actions button,
.chatbot-list-panel > header button,
.chatbot-flow-panel header button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid rgba(147, 197, 253, 0.26);
  border-radius: 8px;
  background: #9ed0ff;
  color: #06131f;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chatbot-dashboard-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.chatbot-list-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202a38;
  padding: 12px;
}

.chatbot-list-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chatbot-list-panel > header strong {
  color: var(--text);
  font-size: 14px;
}

.chatbot-list-panel > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chatbot-data-list-panel {
  grid-column: 1 / -1;
}

.chatbot-flows-list-panel,
.chatbot-rules-list-panel {
  grid-column: 1 / -1;
}

.chatbot-modal {
  width: min(1040px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

.chatbot-flow-screen {
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  height: calc(100vh - 18px);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080e14;
  overflow: hidden;
}

.chatbot-flow-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #0b1117;
  padding: 8px 12px;
}

.chatbot-flow-screen-header div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chatbot-flow-screen-header strong {
  color: var(--text);
  font-size: 15px;
}

.chatbot-flow-screen-header span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-flow-screen-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chatbot-flow-screen-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #00b894;
  color: #041b16;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.chatbot-flow-screen-actions button:first-child {
  border: 1px solid rgba(158, 208, 255, 0.14);
  background: #142131;
  color: var(--text);
}

.chatbot-flow-screen-actions svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.chatbot-test-modal {
  width: min(560px, calc(100vw - 28px));
}

.chatbot-modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.chatbot-flow-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.chatbot-flow-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.chatbot-node-menu {
  position: absolute;
  top: 44px;
  left: 10px;
  z-index: 8;
  width: 36px;
  pointer-events: none;
}

.chatbot-node-menu-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(32, 208, 182, 0.42);
  border-radius: 10px;
  background: #0f1b25;
  color: #20d0b6;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.chatbot-node-menu-toggle svg,
.chatbot-node-menu header button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chatbot-node-menu-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  width: min(286px, calc(100vw - 96px));
  max-height: min(590px, calc(100vh - 176px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 12px;
  background: #151c26;
  padding: 10px;
  pointer-events: auto;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
  transform: translateX(-12px) scaleX(0.92);
  transform-origin: left center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.chatbot-node-menu.is-open {
  width: min(340px, calc(100vw - 56px));
}

.chatbot-node-menu.is-open .chatbot-node-menu-toggle {
  display: none;
}

.chatbot-node-menu.is-open .chatbot-node-menu-panel {
  position: fixed;
  top: 146px;
  left: 12px;
  height: min(560px, calc(100vh - 164px));
  max-height: calc(100vh - 164px);
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scaleX(1);
}

.chatbot-node-menu header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.chatbot-node-menu header span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chatbot-node-menu header strong {
  color: var(--text);
  font-size: 14px;
}

.chatbot-node-menu header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chatbot-node-menu header button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #0f1620;
  color: #c7d4df;
  cursor: pointer;
}

.chatbot-node-search input {
  width: 100%;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 10px;
  background: #101722;
  color: var(--text);
  padding: 8px 10px;
  outline: 0;
}

.chatbot-node-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chatbot-node-filters button {
  border: 1px solid rgba(20, 184, 166, 0.38);
  border-radius: 7px;
  background: rgba(20, 184, 166, 0.08);
  color: #20d0b6;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.chatbot-node-filters button.active {
  background: #20d0b6;
  color: #05231f;
}

.chatbot-node-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.chatbot-node-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid rgba(158, 208, 255, 0.08);
  border-radius: 10px;
  background: #0f1620;
  color: var(--text);
  padding: 7px;
  text-align: left;
  cursor: pointer;
}

.chatbot-node-card:hover {
  border-color: rgba(158, 208, 255, 0.24);
  background: #131d29;
}

.chatbot-node-card i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.1);
  color: #20d0b6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.chatbot-node-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chatbot-node-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-node-card small {
  overflow: hidden;
  color: #738094;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-node-card.tone-blue i {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.chatbot-node-card.tone-yellow i {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.chatbot-node-card.tone-red i {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.chatbot-node-card.tone-gray i {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.chatbot-modal-form label,
.chatbot-connection-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chatbot-flow-form > .chatbot-flow-meta,
.chatbot-flow-form > .chatbot-visual-builder,
.chatbot-flow-form > .confirm-modal-actions {
  grid-column: 1 / -1;
}

.chatbot-flow-meta {
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: #0b1118;
}

.chatbot-flow-meta summary {
  min-height: 34px;
  padding: 9px 11px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.chatbot-flow-meta-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px minmax(240px, 1fr);
  gap: 9px;
  border-top: 1px solid rgba(158, 208, 255, 0.1);
  padding: 10px;
}

.chatbot-flow-meta-grid label:last-child {
  grid-column: 1 / -1;
}

.chatbot-flow-prompt-panel {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 80;
  display: grid;
  gap: 12px;
  width: min(780px, calc(100vw - 36px));
  max-height: calc(100vh - 118px);
  overflow: auto;
  border: 1px solid rgba(32, 208, 182, 0.28);
  border-radius: 12px;
  background: #0b1219;
  padding: 14px;
  box-shadow: 0 0 0 9999px rgba(3, 7, 11, 0.68), 0 28px 70px rgba(0, 0, 0, 0.46);
  transform: translateX(-50%);
}

.chatbot-flow-prompt-panel[hidden] {
  display: none;
}

.chatbot-flow-prompt-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(158, 208, 255, 0.12);
  padding-bottom: 10px;
}

.chatbot-flow-prompt-panel header span {
  display: grid;
  gap: 2px;
}

.chatbot-flow-prompt-panel header strong {
  color: var(--text);
  font-size: 13px;
}

.chatbot-flow-prompt-panel header small {
  color: var(--muted);
  font-size: 11px;
}

.chatbot-flow-prompt-panel header button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #0b121b;
  color: #d7e8f3;
  cursor: pointer;
}

.chatbot-flow-prompt-panel header button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chatbot-flow-prompt-panel textarea {
  min-height: 190px;
  resize: vertical;
}

.chatbot-flow-prompt-actions {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr);
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(158, 208, 255, 0.12);
  padding-top: 10px;
}

.chatbot-flow-prompt-actions span {
  grid-column: 1 / -1;
  color: #9ed0ff;
  font-size: 12px;
}

.chatbot-modal-form .wide-field,
.chatbot-connection-field {
  grid-column: 1 / -1;
}

.chatbot-modal-form input,
.chatbot-modal-form select,
.chatbot-modal-form textarea {
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.28);
  border-radius: 8px;
  background: #111b26;
  color: var(--text);
  padding: 9px 10px;
  outline: 0;
}

.chatbot-flow-form input,
.chatbot-flow-form select,
.chatbot-flow-form textarea {
  padding: 8px 10px;
}

.chatbot-flow-form textarea {
  min-height: 58px;
}

.chatbot-modal-form select[multiple] {
  min-height: 82px;
}

.chatbot-modal-form textarea {
  resize: vertical;
}

.chatbot-visual-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chatbot-canvas-wrap,
.chatbot-node-properties {
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: #0b1118;
  overflow: hidden;
}

.chatbot-canvas-wrap {
  position: relative;
}

.chatbot-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  border-bottom: 1px solid rgba(158, 208, 255, 0.1);
  padding: 0 11px;
}

.chatbot-canvas-toolbar > span {
  flex: 1;
  text-align: right;
}

.chatbot-canvas-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chatbot-canvas-zoom button {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 7px;
  background: #101a24;
  color: #cfe7f7;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.chatbot-canvas-zoom button:hover {
  border-color: rgba(32, 208, 182, 0.42);
  color: #20d0b6;
}

.chatbot-canvas-zoom output {
  min-width: 44px;
  color: #9ed0ff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.chatbot-canvas-toolbar strong {
  color: var(--text);
  font-size: 12px;
}

.chatbot-canvas-toolbar span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-flow-canvas {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background-color: #090f15;
  background-image: radial-gradient(rgba(158, 208, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.chatbot-flow-spacer {
  position: relative;
}

.chatbot-flow-surface {
  position: absolute;
  inset: 0 auto auto 0;
  transform-origin: 0 0;
}

.chatbot-flow-lines {
  position: absolute;
  inset: 0;
  width: 1400px;
  height: 900px;
  pointer-events: none;
}

.chatbot-flow-lines path {
  fill: none;
  stroke: #00b59f;
  stroke-linecap: round;
  stroke-width: 2;
  opacity: 0.86;
}

.chatbot-canvas-node {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 7px;
  width: 220px;
  min-height: 94px;
  border: 1px solid rgba(20, 184, 166, 0.42);
  border-radius: 10px;
  background: #101925;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
  color: var(--text);
  padding: 9px;
  cursor: grab;
}

.chatbot-canvas-node.selected {
  border-color: #20d0b6;
  box-shadow: 0 0 0 2px rgba(32, 208, 182, 0.16), 0 14px 30px rgba(0, 0, 0, 0.34);
}

.chatbot-canvas-node header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 7px;
}

.chatbot-canvas-node header i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(20, 184, 166, 0.12);
  color: #20d0b6;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.chatbot-canvas-node header strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-canvas-node header button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.13);
  color: #fb7185;
  cursor: pointer;
}

.chatbot-canvas-node p {
  display: -webkit-box;
  min-height: 30px;
  margin: 0;
  overflow: hidden;
  color: #9cabbc;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chatbot-canvas-node footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #7e8da0;
  font-size: 10px;
}

.chatbot-canvas-node footer span,
.chatbot-canvas-node footer b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-port {
  position: absolute;
  top: 40px;
  width: 8px;
  height: 8px;
  border: 1px solid #07231f;
  border-radius: 50%;
  background: #20d0b6;
}

.node-port-in {
  left: -5px;
}

.node-port-out {
  right: -5px;
}

.chatbot-node-properties {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.chatbot-node-properties header,
.chatbot-node-empty {
  display: grid;
  gap: 3px;
}

.chatbot-node-properties header strong,
.chatbot-node-empty strong {
  color: var(--text);
  font-size: 13px;
}

.chatbot-node-properties header span,
.chatbot-node-empty span,
.chatbot-node-properties small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.chatbot-node-properties label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.chatbot-node-properties label.chatbot-node-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.55);
  padding: 7px 9px;
}

.chatbot-node-properties label.chatbot-node-check input {
  width: 15px;
  min-width: 15px;
  height: 15px;
  padding: 0;
}

.chatbot-node-properties label.chatbot-node-check span {
  color: var(--text);
  font-size: 12px;
}

.chatbot-node-note {
  border: 1px solid rgba(32, 208, 182, 0.22);
  border-radius: 8px;
  background: rgba(0, 181, 159, 0.08);
  color: #bcefe7;
  padding: 9px;
  font-size: 11px;
  line-height: 1.35;
}

.chatbot-node-properties input,
.chatbot-node-properties select,
.chatbot-node-properties textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.22);
  border-radius: 7px;
  background: #101722;
  color: var(--text);
  padding: 8px;
  outline: 0;
}

.chatbot-modal-form > .confirm-modal-actions {
  position: sticky;
  bottom: -12px;
  z-index: 2;
  margin: 0 -12px -12px;
  border-top: 1px solid var(--line);
}

.chatbot-settings-panel {
  width: 100%;
}

.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  min-height: 36px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.switch-inline input {
  width: 16px;
  height: 16px;
}

.chatbot-connection-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chatbot-voice-preview {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 8px;
  background: #101722;
  padding: 10px;
}

.chatbot-voice-preview label {
  margin: 0;
}

.chatbot-voice-preview button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: #9ed0ff;
  color: #06131f;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.chatbot-voice-preview button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.chatbot-voice-preview button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.chatbot-voice-preview [data-chatbot-voice-preview-result] {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chatbot-voice-preview [data-chatbot-voice-preview-output] {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.chatbot-voice-preview [data-chatbot-voice-preview-output][hidden] {
  display: none;
}

.chatbot-voice-preview audio {
  width: 100%;
  height: 34px;
}

.chatbot-voice-preview small {
  color: var(--muted);
  font-size: 11px;
}

.chatbot-connection-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid rgba(158, 208, 255, 0.18);
  border-radius: 8px;
  background: #172231;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.chatbot-rules-panel,
.chatbot-rule-form {
  display: grid;
  gap: 12px;
}

.chatbot-flow-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202a38;
  padding: 12px;
}

.chatbot-flow-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chatbot-flow-panel header strong {
  color: var(--text);
  font-size: 14px;
}

.chatbot-flow-panel header button {
  border: 1px solid rgba(147, 197, 253, 0.26);
  border-radius: 8px;
  background: #9ed0ff;
  color: #06131f;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chatbot-flow-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.chatbot-flow-cards article {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 8px;
  background: #111b26;
  padding: 9px;
}

.chatbot-flow-cards strong {
  color: var(--muted);
  font-size: 11px;
}

.chatbot-flow-cards span {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-flow-cards small {
  color: var(--muted);
  font-size: 10px;
}

.chatbot-rule-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202a38;
  padding: 12px;
}

.chatbot-rule-form header {
  display: grid;
  gap: 3px;
}

.chatbot-rule-form header span {
  color: var(--muted);
  font-size: 12px;
}

.chatbot-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chatbot-rule-grid label,
.chatbot-rule-response {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chatbot-rule-grid input,
.chatbot-rule-grid select,
.chatbot-rule-response textarea {
  min-width: 0;
  border: 1px solid rgba(158, 208, 255, 0.28);
  border-radius: 8px;
  background: #111b26;
  color: var(--text);
  padding: 9px 10px;
  outline: 0;
}

.chatbot-crm-grid select[multiple] {
  min-height: 82px;
  padding: 7px;
}

.chatbot-test-form {
  background: #162230;
}

.chatbot-test-result {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 8px;
  background: #0f1823;
  padding: 10px;
}

.chatbot-test-result[hidden] {
  display: none;
}

.chatbot-test-result strong {
  color: var(--text);
  font-size: 13px;
}

.chatbot-test-result small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chatbot-test-result p {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.module-table.compact-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.module-table-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.module-table-actions .table-icon-button,
.module-table-actions button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 8px;
  background: #101a24;
  color: #9ed0ff;
  padding: 0;
  cursor: pointer;
}

.module-table-actions .table-icon-button:hover,
.module-table-actions button:hover {
  border-color: rgba(158, 208, 255, 0.38);
  background: #172536;
}

.module-table-actions .table-icon-button:last-child,
.module-table-actions button:last-child {
  color: #ff8b8b;
}

.module-table-actions svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 980px) {
  .chatbot-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chatbot-modal-form {
    grid-template-columns: 1fr;
  }

  .chatbot-visual-builder {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .chatbot-flow-prompt-actions {
    grid-template-columns: 1fr 1fr;
  }

  .chatbot-node-properties {
    max-height: none;
  }

  .chatbot-layout {
    grid-template-columns: 1fr;
  }

  .chatbot-flow-cards {
    grid-template-columns: 1fr;
  }

  .settings-hour-row {
    grid-template-columns: 18px 34px 1fr 16px 1fr;
  }
}

@media (max-height: 760px) {
  .modal-backdrop {
    padding: 8px;
  }

  .chatbot-modal {
    max-height: calc(100vh - 16px);
  }

  .chatbot-modal-form {
    gap: 8px;
  }

  .chatbot-modal-form textarea {
    min-height: 62px;
  }

  .chatbot-flow-form textarea {
    min-height: 50px;
  }
}

.settings-action-row,
.settings-danger-row {
  grid-template-columns: minmax(0, 1fr) 36px;
  cursor: pointer;
}

.settings-action-row svg,
.settings-danger-row svg {
  justify-self: center;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.settings-action-row:hover,
.settings-danger-row:hover {
  background: rgba(158, 208, 255, 0.055);
}

.settings-toggle-row {
  grid-template-columns: minmax(0, 1fr) 42px;
  position: relative;
  cursor: pointer;
}

.settings-toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-row i {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #66707c;
  transition: background 0.18s ease;
}

.settings-toggle-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e8edf2;
  transition: transform 0.18s ease;
}

.settings-toggle-row input:checked + i {
  background: #00a884;
}

.settings-toggle-row input:checked + i::after {
  transform: translateX(16px);
}

.settings-danger-row:hover {
  color: #ff7777;
}

.settings-save-status {
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--accent);
  font-size: 13px;
}

.inbox-pane {
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand-bar,
.chat-header {
  display: flex;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line-soft);
  background: #0b1117;
}

.brand-bar {
  gap: 12px;
  padding: 8px 14px;
}

.brand-bar div:nth-child(2),
.chat-person div:nth-child(2) {
  display: grid;
  min-width: 0;
}

.brand-bar .connection-indicators {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.brand-bar .connection-indicators[hidden] {
  display: none;
}

.connection-indicator {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.connection-indicator i {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #8b98a3;
  box-shadow: 0 0 0 2px rgba(139, 152, 163, 0.12);
  color: #071016;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.connection-indicator.is-ready i {
  background: #23d366;
  box-shadow: 0 0 0 2px rgba(35, 211, 102, 0.18), 0 0 8px rgba(35, 211, 102, 0.55);
}

.connection-indicator.is-qr i {
  background: #9ed0ff;
  box-shadow: 0 0 0 2px rgba(158, 208, 255, 0.2), 0 0 8px rgba(158, 208, 255, 0.45);
}

.connection-indicator.is-loading i {
  background: #f2c94c;
  box-shadow: 0 0 0 2px rgba(242, 201, 76, 0.18), 0 0 8px rgba(242, 201, 76, 0.45);
}

.connection-indicator.is-error i {
  background: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.18), 0 0 8px rgba(255, 107, 107, 0.48);
}

.connection-indicator.is-offline i {
  background: #697784;
}

.brand-bar strong,
.chat-person strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-bar span,
.chat-person span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.chat-tag {
  border: 1px solid;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 7px;
}

.chat-tag span {
  color: var(--danger);
  margin-left: 4px;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #00a884, #156b59);
  color: white;
  font-weight: 800;
}

.brand-mark {
  background: url("/assets/wado-mark.svg") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  box-shadow: 0 8px 26px rgba(0, 168, 132, 0.24);
}

.landing-brand::after {
  content: "";
  display: block;
  width: 112px;
  height: 34px;
  background: url("/assets/wado-logo.svg") left center / contain no-repeat;
}

.landing-brand > strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.brand-bar .icon-button:first-of-type {
  margin-left: auto;
}

.brand-bar .header-action[hidden] {
  display: none;
}

.logout-button {
  color: #ffb4b4;
}

.logout-button:hover {
  background: rgba(255, 77, 79, 0.14);
  color: #ff7676;
}

.inbox-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  padding: 4px 10px;
  background: linear-gradient(90deg, rgba(0, 168, 132, 0.16), transparent);
}

.inbox-title p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.1;
}

.inbox-title strong {
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
}

.inbox-title span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #001f18;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.inbox-ai-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 4px 10px 1px;
  color: #9fb0bd;
  font-size: 11px;
}

.inbox-ai-toggle[hidden] {
  display: none;
}

.mini-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.mini-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mini-switch i {
  position: relative;
  display: block;
  width: 32px;
  height: 16px;
  border-radius: 999px;
  background: #23313d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease;
}

.mini-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b9c7d0;
  transition: transform 0.18s ease, background 0.18s ease;
}

.mini-switch input:checked + i {
  background: rgba(0, 168, 132, 0.34);
}

.mini-switch input:checked + i::after {
  transform: translateX(16px);
  background: #00d6ae;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, 90px) 56px 32px;
  gap: 5px;
  align-items: center;
  padding: 5px 9px 2px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b8c6cc;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:hover,
.icon-button.active {
  background: #18242d;
  color: var(--accent);
}

.search-box {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: #18212a;
  color: var(--muted);
}

.search-box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.filters {
  display: flex;
  gap: 4px;
  padding: 3px 9px 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  border: 0;
  border-radius: 999px;
  min-height: 22px;
  padding: 3px 7px;
  background: #111d25;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.filter.active {
  background: rgba(0, 168, 132, 0.16);
  color: var(--accent);
}

.conversation-list {
  min-height: 0;
  overflow-y: auto;
}

.conversation {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 8px;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 5px 7px;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.conversation:hover,
.conversation.selected {
  background: #16232b;
}

.conversation.selected {
  border-left-color: var(--accent);
}

.conversation.needs-attention {
  border-left-color: #ff5f6d;
  background: linear-gradient(90deg, rgba(255, 95, 109, 0.12), rgba(18, 31, 40, 0.1));
}

.conversation.needs-attention:hover,
.conversation.needs-attention.selected {
  background: linear-gradient(90deg, rgba(255, 95, 109, 0.18), #16232b);
}

.conversation .avatar {
  width: 30px;
  height: 30px;
  background: #2b3942;
}

.avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: #1f2b34;
}

.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-main {
  display: grid;
  gap: 0;
  min-width: 0;
}

.conversation-title {
  display: flex;
  align-items: center;
  gap: 3px;
}

.conversation-title strong,
.conversation-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-title strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
}

.conversation-title time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9.5px;
}

.conversation-interest-pill {
  flex: 0 0 auto;
  min-width: 28px;
  border-radius: 999px;
  padding: 1px 4px;
  color: #062019;
  text-align: center;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1.2;
}

.conversation-interest-wrap {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  max-width: 92px;
}

.conversation-ai-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 16px;
}

.interest-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #182736;
  color: #9fb2c4;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.interest-trend::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: none;
  width: max-content;
  max-width: 140px;
  padding: 5px 7px;
  border: 1px solid #304257;
  border-radius: 7px;
  background: #07111b;
  color: #e8f2ff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.interest-trend:hover::after,
.interest-trend:focus-visible::after {
  display: block;
}

.interest-trend.up {
  background: rgba(53, 226, 141, .16);
  color: #35e28d;
}

.interest-trend.down {
  background: rgba(255, 95, 109, .16);
  color: #ff8f99;
}

.interest-intent {
  display: inline-flex;
  align-items: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 1px 5px;
  background: #132231;
  color: #9fb2c4;
  font-size: 8px;
  font-weight: 800;
}

.interest-intent.comercial {
  color: #35e28d;
}

.interest-intent.soporte {
  color: #9ed0ff;
}

.interest-intent.cobro {
  color: #ffcf57;
}

.interest-intent.no_interesado {
  color: #ff8f99;
}

.conversation-interest-pill.tone-hot {
  background: #35e28d;
}

.conversation-interest-pill.tone-warm {
  background: #ffcf57;
}

.conversation-interest-pill.tone-medium {
  background: #9ed0ff;
}

.conversation-interest-pill.tone-cold,
.conversation-interest-pill.tone-low {
  background: #7b8994;
  color: #08121a;
}

.conversation-attention-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  background: #ff5f6d;
  color: #250408;
  padding: 1px 4px;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1.1;
  animation: attentionPulse 1.5s ease-in-out infinite;
}

.conversation-attention-pill svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conversation-summary-action {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(158, 208, 255, 0.16);
  border-radius: 6px;
  background: rgba(12, 22, 31, 0.86);
  color: #9ed0ff;
  cursor: pointer;
}

.conversation-summary-action:hover,
.conversation-summary-action:focus-visible {
  border-color: rgba(0, 168, 132, 0.46);
  background: rgba(0, 168, 132, 0.14);
  color: #61f2cd;
  outline: none;
}

.conversation-summary-action svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conversation-phone,
.conversation-line,
.conversation-preview {
  color: var(--muted);
  font-size: 10.5px;
}

.conversation-subline,
.conversation-bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.conversation-phone {
  overflow: hidden;
  color: #9fb4bd;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-assignee {
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-bot-paused {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 189, 89, 0.34);
  border-radius: 999px;
  background: rgba(255, 189, 89, 0.1);
  color: #ffe0a6;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.conversation-preview {
  min-width: 0;
}

.conversation-line {
  flex: 0 0 auto;
  overflow: hidden;
  width: max-content;
  max-width: 92px;
  border-radius: 999px;
  background: rgba(158, 208, 255, 0.12);
  color: #9ed0ff;
  padding: 0 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
}

.conversation.unread .conversation-title strong,
.conversation.unread .conversation-preview {
  color: #fff;
  font-weight: 800;
}

.conversation.resolved {
  opacity: 0.78;
}

.conversation.resolved .conversation-line {
  background: rgba(158, 208, 255, 0.08);
  color: #b7c8d6;
}

.conversation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.conversation-tags span {
  max-width: 82px;
  overflow: hidden;
  border: 1px solid;
  border-radius: 999px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: flex;
  justify-items: end;
  justify-content: flex-end;
  align-self: center;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.attention-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f6d;
  box-shadow: 0 0 0 4px rgba(255, 95, 109, 0.14);
  animation: attentionPulse 1.5s ease-in-out infinite;
}

@keyframes attentionPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.92);
    opacity: 0.68;
  }
}

.inbox-line-filter,
.inbox-interest-filter {
  height: 30px;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #18212a;
  color: var(--text);
  padding: 0 7px;
  font-size: 11px;
}

.inbox-interest-filter {
  padding: 0 4px;
  font-weight: 800;
}

.inbox-recalculate-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: 1px solid rgba(0, 214, 174, 0.34);
  border-radius: 9px;
  background: rgba(0, 168, 132, 0.14);
  color: var(--accent);
  cursor: pointer;
}

.inbox-recalculate-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.inbox-recalculate-button.is-loading svg {
  animation: spin 1s linear infinite;
}

.inbox-recalculate-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.muted-cell,
.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.admin-wide-field {
  grid-column: 1 / -1;
}

#agentConnections {
  height: 36px;
  min-height: 36px;
}

.line-picker {
  position: relative;
}

.line-picker-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #18212a;
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.line-picker-toggle span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: grid;
  gap: 4px;
  width: min(360px, 90vw);
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  padding: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.line-picker-panel[hidden] {
  display: none;
}

.line-picker-option {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border-radius: 7px;
  padding: 7px 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.line-picker-option:hover {
  background: #18242d;
}

.line-picker-option input {
  grid-row: 1 / span 2;
  width: 14px;
  height: 14px;
  margin: 0;
  justify-self: center;
}

.line-picker-option span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-picker-option small {
  color: var(--muted);
  font-size: 11px;
}

.line-picker-all {
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  margin-bottom: 3px;
  color: var(--accent);
  font-weight: 800;
}

.line-picker-all input {
  grid-row: auto;
}

.empty {
  padding: 24px 16px;
  color: var(--muted);
  line-height: 1.45;
}

.chat-pane {
  position: relative;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #071016;
}

.chat-pane.has-last-call {
  grid-template-rows: 58px auto minmax(0, 1fr) auto;
}

.chat-header {
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px;
}

.chat-person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  cursor: pointer;
}

.chat-actions {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
}

.chat-last-call-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-bottom: 1px solid rgba(158, 208, 255, 0.14);
  background: #0d1822;
  padding: 5px 14px;
  color: #c8d6e2;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
}

.chat-last-call-strip[hidden] {
  display: none;
}

.chat-last-call-strip svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.chat-last-call-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9ed0ff;
  font-weight: 900;
  white-space: nowrap;
}

.chat-last-call-strip strong {
  color: #f5fbff;
  white-space: nowrap;
}

.chat-last-call-strip em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-last-call-strip button {
  flex: 0 0 auto;
  min-height: 24px;
  border: 1px solid rgba(32, 208, 182, 0.35);
  border-radius: 999px;
  background: rgba(32, 208, 182, 0.08);
  color: #20d0b6;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  margin-left: auto;
}

.chat-actions .admin-open,
.chat-actions #chatLogoutButton,
.chat-actions .quick-reply-open,
.chat-actions button[title="Descargar"] {
  display: none;
}

.chat-actions #readStateButton {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #b8c7cf;
  font-size: 0;
}

.attention-alert {
  position: relative;
}

.attention-alert[hidden] {
  display: none;
}

.attention-bell {
  position: relative;
  width: 34px;
  height: 34px;
  color: #eaf3f8;
}

.attention-bell svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.attention-bell span {
  position: absolute;
  top: 2px;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border: 2px solid #0b1117;
  border-radius: 999px;
  background: #ff5d5d;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.attention-alert.is-ringing .attention-bell {
  animation: attentionBellShake 1.4s ease-in-out infinite;
}

.attention-panel {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 65;
  display: grid;
  gap: 2px;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(158, 208, 255, 0.18);
  border-left: 5px solid #24d366;
  border-radius: 8px;
  background: #222c3a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  padding: 9px;
}

.attention-panel[hidden] {
  display: none;
}

.attention-panel > strong {
  color: #eaf3f8;
  font-size: 13px;
  padding: 2px 4px 6px;
}

.attention-panel button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: #eaf3f8;
  cursor: pointer;
  padding: 8px 5px;
  text-align: left;
}

.attention-panel button:hover {
  background: rgba(255, 255, 255, 0.055);
}

.attention-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: #334150;
  color: #f2f8fb;
  font-size: 12px;
  font-weight: 900;
}

.attention-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attention-panel b,
.attention-panel small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-panel b {
  font-size: 13px;
}

.attention-panel small {
  color: #b9c7d0;
  font-size: 12px;
  margin-top: 2px;
}

.attention-panel .attention-phone {
  color: #eef7fb;
  font-weight: 800;
}

.attention-panel em {
  color: #d7e8f7;
  font-size: 12px;
  font-style: normal;
}

@keyframes attentionBellShake {
  0%, 38%, 100% { transform: rotate(0); }
  8% { transform: rotate(12deg); }
  16% { transform: rotate(-10deg); }
  24% { transform: rotate(8deg); }
  32% { transform: rotate(-5deg); }
}

.chat-actions #readStateButton.is-unread {
  color: var(--accent);
  background: rgba(0, 168, 132, 0.12);
}

.chat-actions #readStateButton.is-unread::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.chat-actions #chatSearchButton,
.chat-actions #conversationSummaryButton,
.chat-actions #conversationVoiceDraftButton,
.chat-actions #chatFollowupButton {
  position: relative;
  font-size: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #b8c7cf;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-actions #detailsToggleButton {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #b8c7cf;
  font-size: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-actions #chatSearchButton:hover,
.chat-actions #chatSearchButton.active,
.chat-actions #conversationSummaryButton:hover,
.chat-actions #conversationVoiceDraftButton:hover,
.chat-actions #chatFollowupButton:hover,
.chat-actions #chatFollowupButton.active,
.chat-actions #detailsToggleButton:hover,
.chat-actions #detailsToggleButton.active {
  background: rgba(158, 208, 255, 0.1);
  color: #e6f1f6;
}

.chat-actions #readStateButton svg,
.chat-actions #callContactButton svg,
.chat-actions #conversationSummaryButton svg,
.chat-actions #conversationVoiceDraftButton svg,
.chat-actions #chatFollowupButton svg,
.chat-actions #chatSearchButton svg,
.chat-actions #detailsToggleButton svg,
.chat-actions #resolveChatButton svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.chat-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px 30px 30px;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #121b25;
  padding: 7px 12px;
}

.chat-search-bar[hidden] {
  display: none;
}

.chat-search-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 34px;
  border-radius: 999px;
  background: #1f2b38;
  padding: 0 10px;
}

.chat-search-bar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #9eb4c3;
  stroke-width: 2;
}

.chat-search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.chat-search-bar span {
  color: #a8bac8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chat-search-bar button {
  display: grid;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #1c2935;
  color: #e6f1f8;
  cursor: pointer;
  font-weight: 900;
  place-items: center;
}

.chat-search-bar button:disabled {
  cursor: default;
  opacity: 0.38;
}

.chat-actions #resolveChatButton {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 168, 132, 0.12);
  color: var(--accent);
  padding: 0;
}

.chat-actions #callContactButton {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #54e29d;
  background: rgba(84, 226, 157, 0.1);
  padding: 0;
}

.chat-actions #callContactButton:hover {
  background: rgba(84, 226, 157, 0.18);
  color: #8cffbd;
}

.details-panel {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 18px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.details-panel[hidden] {
  display: none;
}

.details-profile {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

.details-top-actions {
  display: flex;
  gap: 8px;
  justify-self: end;
}

.details-profile .icon-button {
  width: 30px;
  height: 30px;
}

.details-profile .avatar {
  width: 58px;
  height: 58px;
}

.details-profile span {
  color: var(--muted);
  font-size: 13px;
}

.details-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.details-section:last-of-type {
  padding-bottom: 46px;
  border-bottom: 0;
}

.details-section-title {
  border: 0;
  background: transparent;
  color: #9fb4bd;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}

.details-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.small-action {
  border: 0;
  border-radius: 999px;
  background: #18242d;
  color: var(--accent);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.small-action[hidden] {
  display: none;
}

.contact-edit-action {
  justify-self: start;
  margin-bottom: 18px;
  padding: 5px 8px;
  font-size: 11px;
}

.chatbot-state-action {
  width: 100%;
  border: 1px solid rgba(0, 224, 130, 0.28);
  background: rgba(0, 224, 130, 0.08);
  color: #b8ffe2;
}

.chatbot-state-action.is-paused {
  border-color: rgba(255, 189, 89, 0.35);
  background: rgba(255, 189, 89, 0.1);
  color: #ffe0a6;
}

.contact-summary {
  display: grid;
  gap: 7px;
  margin: 0;
}

.contact-summary div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.contact-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.contact-summary dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.assigned-agent {
  color: var(--text);
  font-weight: 800;
}

.followup-mini {
  display: grid;
  gap: 8px;
}

.followup-mini p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.followup-stage-pill {
  justify-self: start;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent);
  background: rgba(0, 184, 148, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.followup-mini dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.followup-mini dl div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 6px;
}

.followup-mini dt {
  color: var(--muted);
  font-size: 11px;
}

.followup-mini dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.details-section .tag-select,
.details-section .transfer-select {
  width: 100%;
  max-width: none;
}

.transfer-select {
  max-width: 160px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #18212a;
  color: var(--text);
  padding: 0 10px;
}

.tag-select {
  width: 150px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #18212a;
  color: var(--text);
  padding: 4px 8px;
}

.danger-action {
  color: var(--danger);
}

.send-button:disabled,
.composer textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-body {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px;
  background-color: #071016;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px),
    radial-gradient(circle at 70px 52px, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px),
    linear-gradient(135deg, rgba(0, 168, 132, 0.03), rgba(255, 255, 255, 0));
  background-size: 92px 92px, 120px 120px, 100% 100%;
}

.messages-canvas {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(100%, 980px);
  min-height: 100%;
  margin: 0 auto;
}

.welcome-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 100%;
  color: var(--muted);
  text-align: center;
}

.welcome-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
}

.welcome-card p {
  width: min(440px, 100%);
  margin: 0;
  line-height: 1.5;
}

.qr-card {
  display: grid;
  place-items: center;
  width: min(260px, 80vw);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #334;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.qr-card img {
  width: 92%;
  height: auto;
}

.connected-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: min(280px, 72vw);
  height: 220px;
  border: 1px solid rgba(0, 168, 132, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 168, 132, 0.18), rgba(158, 208, 255, 0.08)),
    #0f1a22;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.connected-illustration::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.connected-phone {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  height: 146px;
  border: 2px solid rgba(158, 208, 255, 0.62);
  border-radius: 22px;
  background: #101820;
}

.connected-phone span,
.connected-phone em {
  position: absolute;
  right: 28px;
  left: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.connected-phone span {
  top: 12px;
}

.connected-phone em {
  bottom: 12px;
}

.connected-phone strong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #041b16;
  font-size: 24px;
}

.connected-bubbles span {
  position: absolute;
  z-index: 1;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(158, 208, 255, 0.18);
}

.connected-bubbles span:nth-child(1) {
  top: 54px;
  left: 38px;
}

.connected-bubbles span:nth-child(2) {
  right: 34px;
  bottom: 58px;
  width: 58px;
  background: rgba(0, 168, 132, 0.22);
}

.connected-bubbles span:nth-child(3) {
  right: 44px;
  top: 48px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.date-pill {
  width: max-content;
  margin: 8px auto 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 32, 0.9);
  color: var(--muted);
  font-size: 12px;
}

.message-row {
  display: flex;
  margin: 4px 0;
}

.message-row.outbound {
  justify-content: flex-end;
}

.message-bubble {
  position: relative;
  max-width: min(680px, 78%);
  padding: 10px 12px 8px;
  border-radius: 8px;
  background: var(--bubble-in);
  color: var(--text);
  line-height: 1.4;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  font-size: 15px;
}

.message-row.outbound .message-bubble {
  background: var(--bubble-out);
}

.message-agent {
  display: block;
  max-width: 260px;
  margin: 0 22px 3px 0;
  color: #bfeee2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-bubble p:empty {
  display: none;
}

.quoted-message {
  display: grid;
  gap: 2px;
  width: 100%;
  max-width: 420px;
  border: 0;
  border-left: 3px solid rgba(0, 188, 150, 0.95);
  border-radius: 7px;
  background: rgba(7, 18, 24, 0.34);
  color: inherit;
  margin: 0 0 7px;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
}

.message-row.outbound .quoted-message {
  background: rgba(4, 75, 63, 0.42);
}

.quoted-message strong {
  color: #9bd6ff;
  font-size: 12px;
  line-height: 1.2;
}

.quoted-message span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-highlight .message-bubble {
  outline: 2px solid rgba(157, 214, 255, 0.82);
  outline-offset: 2px;
}

.message-search-match .message-bubble {
  box-shadow: 0 0 0 2px rgba(255, 214, 102, 0.34);
}

.message-search-match.is-current .message-bubble {
  outline: 2px solid #ffd666;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(255, 214, 102, 0.16);
}

.reply-preview {
  position: absolute;
  left: 92px;
  right: 70px;
  bottom: 66px;
  z-index: 19;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  max-width: 520px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(18, 29, 38, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  padding: 8px 8px 8px 10px;
}

.reply-preview[hidden] {
  display: none;
}

.reply-preview div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reply-preview strong {
  color: #8cffbd;
  font-size: 12px;
  line-height: 1.15;
}

.reply-preview span {
  overflow: hidden;
  color: #dce7ee;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #dce7ee;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 3px;
}

.message-row.is-deleted .message-bubble {
  background: rgba(20, 32, 40, 0.9);
  color: var(--muted);
  font-style: italic;
}

.message-star {
  position: absolute;
  left: 7px;
  bottom: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.message-menu-toggle {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}

.message-row.outbound .message-menu-toggle {
  right: 6px;
  left: auto;
}

.message-bubble:hover .message-menu-toggle,
.message-menu-toggle:focus,
.message-menu.is-open + .message-menu-toggle {
  opacity: 1;
}

.message-menu {
  position: absolute;
  top: 28px;
  left: 6px;
  z-index: 40;
  display: none;
  min-width: 205px;
  overflow: hidden;
  border-radius: 8px;
  background: #273241;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  padding: 6px 0;
}

.message-row.outbound .message-menu {
  right: 6px;
  left: auto;
}

.message-menu.is-open {
  display: grid;
}

.message-menu.open-up {
  top: auto;
  bottom: 28px;
}

.message-menu button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #f2f6f8;
  padding: 9px 14px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.message-menu button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.message-menu button:disabled {
  color: rgba(242, 246, 248, 0.38);
  cursor: not-allowed;
}

.message-menu button span {
  color: #f2f6f8;
  font-size: 18px;
  line-height: 1;
}

.message-media {
  display: block;
  width: min(330px, 100%);
  max-height: min(330px, 42vh);
  margin-bottom: 6px;
  border-radius: 7px;
  background: #071016;
  object-fit: contain;
}

.image-media {
  cursor: zoom-in;
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 48px 22px 34px;
  background: rgba(1, 7, 10, 0.88);
  backdrop-filter: blur(8px);
}

.media-viewer[hidden] {
  display: none;
}

.media-viewer img {
  display: block;
  max-width: min(96vw, 1180px);
  max-height: calc(100vh - 118px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  cursor: zoom-out;
}

.media-viewer-close {
  position: fixed;
  top: 16px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(18, 31, 40, 0.9);
  color: #f4fbff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.media-viewer span {
  position: fixed;
  left: 50%;
  bottom: 16px;
  max-width: min(720px, calc(100vw - 44px));
  transform: translateX(-50%);
  color: #dbe8f0;
  font-size: 13px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-media {
  width: min(150px, 36vw);
  max-height: 150px;
  margin: 0;
  background: transparent;
  object-fit: contain;
}

.message-bubble:has(.sticker-media) {
  padding: 6px;
  background: transparent;
  box-shadow: none;
}

.voice-note {
  --voice-progress: 0%;
  display: grid;
  grid-template-columns: 30px minmax(92px, 1fr) 34px;
  gap: 8px;
  align-items: center;
  width: min(240px, 64vw);
  min-height: 36px;
  margin-bottom: 2px;
}

.message-bubble:has(.voice-note) {
  max-width: min(290px, 76%);
  padding: 8px 10px 6px;
}

.voice-play {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.voice-wave {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  height: 28px;
  cursor: pointer;
}

.voice-wave::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--voice-progress);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.voice-wave span {
  position: relative;
  z-index: 1;
  width: 3px;
  border-radius: 999px;
  background: rgba(238, 246, 244, 0.72);
}

.voice-duration {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-align: right;
}

.message-transcription {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  border-left: 3px solid #2ccdb0;
  border-radius: 7px;
  background: rgba(5, 19, 25, 0.28);
  padding: 6px 8px;
  color: #d8f4ee;
}

.message-transcription.compact {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}

.message-transcription strong {
  color: #8cf2db;
  font-size: 11px;
  line-height: 1.1;
  text-transform: uppercase;
}

.message-transcription span {
  font-size: 13px;
  line-height: 1.35;
}

.message-transcription small {
  color: #9fb0bd;
  font-size: 11px;
}

.message-transcription button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: rgba(158, 208, 255, 0.96);
  color: #07131d;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.message-transcription button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.message-transcription .transcription-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(140, 242, 219, 0.12);
  color: #8cf2db;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.message-transcription.failed,
.message-transcription.skipped {
  border-left-color: #ffb86c;
}

.message-transcription.compact.failed button,
.message-transcription.compact.skipped button {
  background: rgba(255, 216, 161, 0.95);
}

.document-media,
.media-fallback {
  display: grid;
  gap: 4px;
  min-width: min(280px, 100%);
  margin-bottom: 6px;
  padding: 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
}

.document-media span,
.media-fallback {
  color: var(--muted);
  font-size: 12px;
}

.message-time {
  display: inline-block;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11.5px;
  text-align: right;
}

.message-ack {
  display: inline-flex;
  align-items: center;
  min-width: 15px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.message-ack.is-read {
  color: #53bdeb;
}

.message-ack.is-failed {
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 92, 92, 0.18);
  color: #ff7b7b;
  letter-spacing: 0;
  font-size: 11px;
}

.message-ack.is-pending {
  color: rgba(255, 255, 255, 0.46);
  letter-spacing: 0;
  font-size: 11px;
}

.composer {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 34px 34px minmax(120px, 170px) minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
  padding: 8px 14px;
  min-height: 58px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #3b4557;
}

.has-selected-chat .composer {
  grid-template-columns: 34px 34px minmax(0, 1fr) 38px;
}

.has-selected-chat #recipientInput {
  display: none;
}

.composer-icon,
.send-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f4f7fb;
  cursor: pointer;
  padding: 0;
}

.composer-icon:hover,
.send-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.composer-icon svg,
.send-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.composer-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 44px;
  border-radius: 23px;
  background: #2b3445;
  padding: 0 6px 0 15px;
}

.composer input,
.composer textarea {
  min-width: 0;
  height: 42px;
  max-height: 112px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fbff;
  padding: 11px 0;
  font-size: 15px;
  line-height: 20px;
}

.composer textarea::placeholder,
.composer input::placeholder {
  color: #c4ccd8;
}

.composer textarea {
  resize: none;
}

#recipientInput {
  height: 40px;
  border-radius: 20px;
  background: #2b3445;
  padding: 0 14px;
}

.send-button {
  background: var(--accent);
  color: #001f18;
}

.send-button:hover {
  background: #13c7a3;
}

.voice-button.recording {
  background: #ff4d4f;
  color: #fff;
}

.voice-button.recording svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke-width: 0;
}

@media (max-width: 720px) {
  .composer,
  .has-selected-chat .composer {
    grid-template-columns: 32px 32px minmax(0, 1fr) 36px;
    padding: 7px 10px;
  }

  #recipientInput {
    display: none;
  }

  .composer-icon,
  .send-button {
    width: 32px;
    height: 32px;
  }
}

.attachment-preview {
  position: absolute;
  left: 92px;
  right: 70px;
  bottom: 66px;
  z-index: 18;
  display: flex;
  align-items: center;
  min-height: 0;
  pointer-events: none;
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-preview > * {
  pointer-events: auto;
}

.recording-pill,
.attachment-chip-preview {
  width: fit-content;
  max-width: min(460px, 100%);
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(19, 29, 39, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.recording-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  color: #f4f8fb;
  font-size: 13px;
}

.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 0 5px rgba(255, 77, 79, 0.14);
}

.recording-label {
  color: #ffb4b6;
  font-weight: 700;
}

.recording-pill strong {
  min-width: 34px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.recording-hint {
  color: #9fb0bc;
  font-size: 12px;
}

.attachment-chip-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 10px;
  color: #eef6fb;
  font-size: 13px;
}

.attachment-chip-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 168, 132, 0.16);
  color: var(--accent);
}

.attachment-chip-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attachment-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip-preview button {
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce7ee;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.attachment-chip-preview button:hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 720px) {
  .attachment-preview {
    left: 52px;
    right: 52px;
    bottom: 60px;
  }

  .recording-hint {
    display: none;
  }
}
.send-result {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 35;
  max-width: min(560px, calc(100vw - 48px));
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 128, 128, 0.28);
  border-radius: 999px;
  color: #ffd4d4;
  background: rgba(15, 23, 31, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%);
}

.send-result:empty {
  display: none;
}

.emoji-picker {
  position: fixed;
  left: 400px;
  bottom: 72px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(8, 36px);
  gap: 6px;
  max-width: 330px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.emoji-picker[hidden] {
  display: none;
}

.emoji-option {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.emoji-option:hover {
  background: #18242d;
}

.quick-reply-popover {
  position: fixed;
  left: 400px;
  right: 70px;
  bottom: 72px;
  z-index: 20;
  width: min(520px, calc(100vw - 470px));
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.quick-reply-popover[hidden] {
  display: none;
}

.scheduled-quick-reply-popover {
  position: static;
  width: 100%;
  max-height: 190px;
  margin-top: -6px;
  box-shadow: none;
}

.quick-reply-option {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.quick-reply-option:hover {
  background: #18242d;
}

.quick-reply-option strong {
  color: var(--accent);
}

.quick-reply-option span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #0b1117;
}

.modal-header div {
  display: grid;
  gap: 3px;
}

.modal-header span {
  color: var(--muted);
  font-size: 13px;
}

.confirm-modal {
  width: min(430px, calc(100vw - 28px));
  grid-template-rows: auto auto;
  border-color: rgba(0, 188, 151, 0.2);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.confirm-modal-header {
  background: #101820;
}

.confirm-modal-header strong {
  font-size: 16px;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 16px 16px;
  background: #101820;
}

.confirm-modal-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 13px;
  background: var(--accent);
  color: #041b16;
  cursor: pointer;
  font-weight: 800;
}

.confirm-modal-actions .secondary-button {
  background: #1a2630;
  color: var(--text);
}

.confirm-modal-actions .danger-button {
  background: #ff5c5c;
  color: #210707;
}

.forward-modal {
  width: min(560px, calc(100vw - 28px));
  grid-template-rows: auto auto;
}

.forward-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.forward-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.forward-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #18212a;
  color: var(--text);
  padding: 10px 12px;
}

.forward-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.forward-selection-bar strong {
  color: var(--accent);
  font-size: 13px;
}

.forward-selection-bar span {
  color: var(--muted);
  font-size: 12px;
}

.forward-chat-list {
  display: grid;
  gap: 6px;
  max-height: min(300px, 42vh);
  overflow: auto;
  padding-right: 2px;
}

.forward-chat {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111a22;
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.forward-chat:hover,
.forward-chat.selected {
  border-color: rgba(0, 188, 150, 0.75);
  background: #14242a;
}

.forward-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #273542;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}

.forward-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forward-chat-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.forward-chat-main strong,
.forward-chat-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forward-chat-main span {
  color: var(--muted);
  font-size: 12px;
}

.forward-chat-check {
  display: none;
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.forward-chat.selected .forward-chat-check {
  display: block;
}

.forward-empty {
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.forward-form .confirm-modal-actions {
  padding: 0;
  background: transparent;
}

.scheduled-modal {
  width: min(720px, calc(100vw - 28px));
}

.scheduled-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.scheduled-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.scheduled-form input,
.scheduled-form select,
.scheduled-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #18212a;
  color: var(--text);
  padding: 10px 12px;
}

.scheduled-form .wide-field {
  grid-column: 1 / -1;
}

.scheduled-table-wrap {
  max-width: 1180px;
}

.scheduled-table {
  min-width: 920px;
}

.scheduled-table td:nth-child(4) {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduled-table td:last-child {
  text-align: center;
}

.scheduled-table button {
  min-height: 28px;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1;
}

.scheduled-table .table-icon-actions {
  justify-content: center;
}

.scheduled-table .table-icon-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent !important;
  color: #f4f8fb;
  cursor: pointer;
  padding: 0 !important;
}

.scheduled-table .table-icon-actions button:hover {
  background: rgba(158, 208, 255, 0.14) !important;
}

.scheduled-table .table-icon-actions button:last-child:hover {
  color: #ff6b6b;
}

.scheduled-error {
  display: block;
  margin-top: 4px;
  color: #ff9b9b;
  font-size: 11px;
}

.contact-modal {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border-color: rgba(0, 188, 151, 0.22);
}

.contact-modal-header {
  padding: 16px 20px;
  background: rgba(0, 188, 151, 0.08);
}

.modal-title-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #052019;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 188, 151, 0.24);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px 22px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.contact-form .wide-field {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #151e27;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:disabled {
  background: #111820;
  color: #dbe7ed;
  opacity: 0.75;
}

.contact-form button {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #041b16;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 900;
}

.connection-modal {
  width: min(900px, calc(100vw - 24px));
  max-height: min(720px, 94vh);
  background: #283242;
}

.connection-modal .modal-header {
  padding: 18px 24px;
  background: #283242;
}

.connection-modal .modal-header strong {
  color: #9ed0ff;
  font-size: 20px;
}

.connection-form {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 16px 24px 0;
}

.connection-form label {
  display: grid;
  position: relative;
  gap: 7px;
  color: #d9e5ef;
  font-size: 13px;
}

.connection-name-field {
  width: min(210px, 100%);
}

.connection-name-field > span {
  position: absolute;
  top: -8px;
  left: 12px;
  z-index: 1;
  background: #283242;
  padding: 0 5px;
  color: #9ed0ff;
  font-size: 12px;
}

.connection-name-field em {
  color: #ff4d4f;
  font-style: normal;
  padding-left: 12px;
}

.connection-name-field.is-invalid > span {
  color: #ff4d4f;
}

.connection-name-field.is-invalid input {
  border-color: #ff3434;
}

.connection-wide-field {
  grid-column: 1 / -1;
}

.connection-form input,
.connection-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid #7c8aa1;
  border-radius: 8px;
  outline: 0;
  background: #202a38;
  color: var(--text);
  color-scheme: dark;
  padding: 12px 13px;
  font-size: 15px;
}

.connection-form select option {
  background: #202a38;
  color: #f5fbff;
}

.connection-rich-field {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d8e4f0;
  border-radius: 8px;
}

.connection-rich-field.is-muted {
  border-color: #647287;
}

.connection-rich-field textarea {
  width: 100%;
  min-height: 116px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 14px 14px 8px;
  resize: vertical;
  font-size: 15px;
}

.connection-editor-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 44px;
  padding: 0 18px 10px;
  color: #fff;
  font-size: 20px;
}

.connection-editor-toolbar strong {
  font-size: 20px;
  line-height: 1;
}

.connection-editor-toolbar strong:nth-child(2) {
  font-style: italic;
}

.connection-editor-toolbar strong:nth-child(3) {
  text-decoration: underline;
}

.connection-variable-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  border: 1px solid #59667a;
  border-radius: 8px;
  padding: 7px 10px;
  color: #b7c1cb;
  font-size: 12px;
}

.connection-variable-row button {
  border: 0;
  border-radius: 999px;
  background: #596273;
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.connection-form-grid {
  display: grid;
  grid-template-columns: minmax(190px, 245px) minmax(220px, 260px);
  gap: 14px;
}

.connection-cloud-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid rgba(158, 208, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 16, 22, 0.32);
  padding: 10px;
}

.connection-cloud-fields[hidden] {
  display: none;
}

.connection-form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 2px -24px 0;
  border-top: 1px solid var(--line);
  background: #283242;
  padding: 14px 24px;
}

.connection-form-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
}

.connection-form-actions button[type="button"] {
  background: transparent;
  color: #9ed0ff;
}

.connection-form-actions button[type="submit"] {
  background: #9ed0ff;
  color: #06121e;
}

.connection-qr-modal {
  width: min(520px, calc(100vw - 32px));
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.connection-qr-modal .modal-header {
  border-bottom-color: #e5e7eb;
  background: #ffffff;
}

.connection-qr-modal .modal-header strong {
  color: #0f172a;
}

.connection-qr-modal .modal-header span {
  color: #475569;
}

.connection-qr-modal .modal-header button {
  color: #0f172a;
}

.connection-qr-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: #ffffff;
}

.connection-qr-panel img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.connection-qr-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: #0f172a;
}

.connection-qr-panel p,
.connection-qr-panel span {
  margin: 0 0 8px;
  color: #475569;
}

.quick-reply-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, 92vh);
}

.quick-reply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.quick-reply-form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.quick-reply-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.quick-reply-form input,
.quick-reply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #18212a;
  color: var(--text);
  padding: 10px 12px;
}

.quick-reply-form textarea {
  resize: vertical;
}

.quick-reply-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #0b1117;
  color: var(--muted);
  font-size: 13px;
}

.quick-reply-file[hidden] {
  display: none;
}

.quick-reply-file button,
.form-actions button,
.quick-reply-actions button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #18242d;
  color: var(--text);
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.form-actions button:first-child {
  background: var(--accent);
  color: #001f18;
  font-weight: 800;
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.quick-reply-list {
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.quick-reply-list[hidden] {
  display: none;
}

.quick-reply-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #101820;
  margin-bottom: 10px;
}

.quick-reply-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quick-reply-card code {
  color: var(--accent);
}

.quick-reply-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.quick-reply-actions {
  display: flex;
  gap: 8px;
}

.quick-reply-attachment {
  color: #9fb4bd;
  font-size: 12px;
}

.jarvis-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 28px));
  overflow: hidden;
}

.jarvis-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.jarvis-form textarea {
  width: 100%;
  min-height: 112px;
  border: 1px solid #33506d;
  border-radius: 8px;
  background: #101923;
  color: var(--text);
  padding: 12px;
  resize: vertical;
}

.jarvis-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jarvis-quick-actions button {
  border: 1px solid rgba(141, 199, 255, 0.25);
  border-radius: 999px;
  background: #152233;
  color: #cfe8ff;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.jarvis-result {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding: 14px;
}

.jarvis-result[hidden] {
  display: none;
}

.jarvis-answer {
  border: 1px solid rgba(0, 184, 148, 0.2);
  border-radius: 8px;
  background: rgba(0, 184, 148, 0.08);
  color: #dffef7;
  padding: 12px;
  line-height: 1.45;
}

.jarvis-actions {
  display: grid;
  gap: 8px;
}

.jarvis-actions button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(158, 208, 255, 0.18);
  border-radius: 8px;
  background: #111c28;
  color: var(--text);
  padding: 11px 12px;
  cursor: pointer;
  text-align: left;
}

.jarvis-actions button:hover {
  border-color: rgba(0, 184, 148, 0.45);
  background: #142233;
}

.jarvis-actions span {
  color: var(--muted);
  font-size: 12px;
}

.admin-modal {
  width: min(1080px, 100%);
  max-height: min(720px, 90vh);
}

.admin-modal .modal-header {
  padding: 10px 14px;
}

.admin-modal .modal-header strong {
  font-size: 16px;
}

.admin-modal .modal-header span {
  font-size: 12px;
}

.admin-login {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 18px;
}

.admin-login[hidden] {
  display: none;
}

.admin-login label,
.admin-grid-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-login input,
.admin-grid-form input,
.admin-grid-form select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #18212a;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}

.admin-login button,
.admin-grid-form button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  padding: 8px 11px;
  background: var(--accent);
  color: #001f18;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.admin-grid-form .secondary-button {
  background: #18242d;
  color: var(--text);
}

.admin-login p {
  margin: 0;
  color: var(--danger);
}

.admin-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.admin-panel[hidden] {
  display: none;
}

.admin-tabs {
  display: flex;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  border: 0;
  border-radius: 999px;
  padding: 6px 11px;
  background: #18242d;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.admin-tab.active {
  background: rgba(0, 168, 132, 0.16);
  color: var(--accent);
}

.admin-section {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 12px;
}

.admin-section.active {
  display: grid;
  gap: 12px;
}

.admin-grid-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px 10px;
  align-items: end;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #101820;
}

.agent-editor {
  grid-template-columns: minmax(130px, 1.1fr) minmax(180px, 1.2fr) minmax(180px, 1.2fr) minmax(130px, 0.8fr);
}

.admin-form-heading {
  display: grid;
  gap: 2px;
  grid-column: 1 / -1;
}

.admin-form-heading strong {
  font-size: 15px;
}

.admin-form-heading span {
  color: var(--muted);
  font-size: 12px;
}

.agent-permissions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 7px;
}

.agent-permissions label {
  display: flex;
  align-items: center;
  min-height: 31px;
  padding: 6px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0d151c;
}

.compact-agent-line {
  grid-column: 1 / 3;
  max-width: 360px;
}

.admin-form-actions {
  display: flex;
  grid-column: 4;
  gap: 8px;
  justify-content: flex-end;
  align-self: end;
}

.admin-form-actions button {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
}

.admin-list {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #101820;
}

.admin-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.admin-card-actions button,
.admin-card-actions select {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #18242d;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #101820;
}

.admin-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0d151c;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td:first-child {
  display: table-cell;
}

.admin-table td:first-child span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill,
.permission-pills span {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #18242d;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.status-pill.is-active,
.permission-pills span.is-on {
  background: rgba(0, 168, 132, 0.16);
  color: var(--accent);
}

.permission-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.team-table-wrap {
  max-width: 1180px;
}

.team-table th:last-child,
.team-table td:last-child {
  width: 110px;
  text-align: right;
}

.team-agent-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.team-agent-name > span {
  align-items: center;
  background: #203445;
  border-radius: 50%;
  color: #d8f2ff;
  display: inline-flex;
  flex: 0 0 30px;
  font-size: 12px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.team-agent-name strong {
  font-size: 14px;
  font-weight: 800;
}

.team-role-pill {
  border: 1px solid rgba(158, 208, 255, 0.18);
  border-radius: 999px;
  color: #d7e8f7;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.team-permission-pills span {
  align-items: center;
  color: #8193a4;
  display: inline-flex;
  gap: 4px;
}

.team-permission-pills svg,
.team-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.team-table .team-actions {
  justify-content: flex-end;
}

.team-table .team-actions button {
  align-items: center;
  background: #142434;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.team-table .team-actions button:hover {
  background: rgba(158, 208, 255, 0.16);
}

@media (max-width: 720px) {
  .landing-nav {
    position: sticky;
  }

  .landing-nav-links a {
    display: none;
  }

  .landing-hero {
    min-height: auto;
    padding: 94px 18px 46px;
  }

  .hero-scene {
    position: relative;
    inset: auto;
    width: 100%;
    margin: 0 0 28px;
  }

  .hero-chat-window {
    padding: 14px;
  }

  .hero-connections {
    flex-direction: column;
  }

  .hero-connections article {
    min-height: 124px;
  }

  .hero-content h1 {
    font-size: clamp(58px, 24vw, 86px);
  }

  .benefit-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .access-gate {
    grid-template-columns: 1fr;
  }

  .access-art {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.details-open {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(292px, 86vw);
    transform: translateX(calc(-100% + 52px));
    transition: transform 0.18s ease;
  }

  .workspace-sidebar:hover,
  .workspace-sidebar:focus-within {
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .workspace-sidebar {
    width: 52px;
    transform: translateX(0);
  }

  .app-shell.module-open {
    grid-template-columns: 1fr;
  }

  .workspace-module {
    padding: 16px 14px 16px 58px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-toolbar {
    grid-template-columns: 1fr;
  }

  .inbox-pane {
    margin-left: 52px;
  }

  .details-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 35;
    width: min(340px, 92vw);
    box-shadow: -18px 0 45px rgba(0, 0, 0, 0.35);
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .composer {
    grid-template-columns: 42px 42px 42px minmax(0, 1fr) 42px;
  }

  #recipientInput {
    display: none;
  }

  .message-bubble {
    max-width: 86%;
  }

  .chat-body {
    padding: 14px 16px;
  }

  .quick-reply-popover {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .emoji-picker {
    left: 12px;
    right: 12px;
    width: auto;
    grid-template-columns: repeat(7, 36px);
  }

  .quick-reply-layout {
    grid-template-columns: 1fr;
  }

  .admin-grid-form {
    grid-template-columns: 1fr;
  }

  .quick-reply-form {
    border: 0;
  }
}

@media (min-width: 1500px) {
  .messages-canvas {
    width: min(100%, 960px);
  }

  .message-bubble {
    font-size: 15px;
  }
}



.connection-edit-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}



.quick-replies-toolbar {
  max-width: 860px;
  grid-template-columns: minmax(260px, 360px);
}

.quick-replies-table-wrap {
  max-width: 1180px;
  background: linear-gradient(180deg, #2a3546, #263241);
}

.quick-replies-table {
  min-width: 880px;
  table-layout: fixed;
}

.quick-replies-table th {
  background: #30394b;
  color: #f2f7fb;
}

.quick-replies-table th:nth-child(1),
.quick-replies-table td:nth-child(1) {
  width: 145px;
}

.quick-replies-table th:nth-child(2),
.quick-replies-table td:nth-child(2) {
  width: auto;
}

.quick-replies-table th:nth-child(3),
.quick-replies-table td:nth-child(3) {
  width: 230px;
}

.quick-replies-table th:nth-child(4),
.quick-replies-table td:nth-child(4) {
  width: 92px;
}

.quick-replies-table tbody tr:nth-child(even) {
  background: rgba(42, 54, 70, 0.82);
}

.quick-replies-table tbody tr:hover {
  background: rgba(64, 81, 104, 0.9);
}

.quick-shortcut {
  color: #f8fbff;
  white-space: nowrap;
}

.quick-message-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quick-message-cell strong,
.quick-message-cell span,
.quick-share-pill {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-message-cell strong {
  color: #eaf3f8;
  font-size: 13px;
}

.quick-message-cell span {
  color: #c4d2dc;
  font-size: 13px;
}

.quick-share-pill {
  display: inline-block;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(158, 208, 255, 0.1);
  color: #dcecff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.quick-replies-table .table-icon-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent !important;
  color: #f4f8fb;
  cursor: pointer;
  padding: 0 !important;
}

.quick-replies-table .table-icon-actions button:hover {
  background: rgba(158, 208, 255, 0.14) !important;
}

.quick-replies-table .table-icon-actions button:last-child:hover {
  color: #ff6b6b;
}

.catalog-modal {
  width: min(920px, calc(100vw - 40px));
}

.catalog-modal .modal-header {
  padding: 18px 22px 14px;
}

.catalog-modal-form {
  padding: 18px 22px 20px;
}

.catalog-modal-grid {
  display: grid;
  grid-template-columns: 120px minmax(230px, 1fr) 150px 140px;
  gap: 14px 12px;
}

.catalog-modal-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-modal-form input,
.catalog-modal-form select,
.catalog-modal-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111820;
  color: var(--text);
  min-height: 38px;
  padding: 9px 10px;
}

.catalog-modal-form textarea {
  min-height: 76px;
  resize: vertical;
}

.catalog-modal-wide {
  grid-column: span 2;
}

.catalog-modal-right {
  grid-column: 3 / 5;
  grid-row: 2 / 4;
}

.catalog-modal-image input[type="file"] {
  padding: 7px;
}

.catalog-modal-form .form-actions {
  margin-top: 16px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(150px, 190px) minmax(140px, 170px) repeat(3, 42px);
  align-items: center;
  gap: 10px;
  max-width: 850px;
}

.catalog-toolbar .module-search {
  width: 100%;
  max-width: none;
}

.catalog-toolbar select {
  min-height: 36px;
  border: 0;
  border-radius: 18px;
  background: #243243;
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.module-small-icon-button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #243243;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 42px;
}

.module-small-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.catalog-category-modal {
  width: min(560px, calc(100vw - 32px));
}

.catalog-category-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.catalog-category-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.catalog-category-form input {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111820;
  color: var(--text);
  height: 36px;
  padding: 0 10px;
}

.catalog-category-form button,
.catalog-category-row button {
  border: 0;
  border-radius: 8px;
  background: #152536;
  color: #fff;
  cursor: pointer;
  display: grid;
  height: 36px;
  place-items: center;
  width: 36px;
}

.catalog-category-form button[type="submit"] {
  background: var(--green);
  color: #06130f;
  align-self: end;
}

.catalog-category-form button svg,
.catalog-category-row button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.catalog-category-list {
  display: grid;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px 14px 14px;
}

.catalog-category-row {
  align-items: center;
  border-bottom: 1px solid rgba(158, 208, 255, 0.12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
}

.catalog-category-row strong {
  color: #f3f8fb;
  font-size: 13px;
}

.catalog-category-row span {
  display: flex;
  gap: 6px;
}

.catalog-card-actions {
  display: flex;
  gap: 6px;
}

.catalog-card-actions button {
  border: 0;
  border-radius: 8px;
  background: rgba(8, 18, 27, 0.82);
  color: #fff;
  cursor: pointer;
  display: grid;
  height: 30px;
  place-items: center;
  width: 30px;
  padding: 0;
}

.catalog-card-actions button svg,
.catalog-card-kind svg,
.catalog-thumb svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.catalog-list {
  display: grid;
  max-width: 1180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101922;
}

.catalog-list-head,
.catalog-card {
  display: grid;
  grid-template-columns: minmax(310px, 1.4fr) minmax(145px, 0.55fr) minmax(170px, 0.7fr) 78px;
  align-items: center;
}

.catalog-list-head {
  min-height: 32px;
  background: #1f2d3c;
  color: #bfe0ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0 12px;
}

.catalog-card {
  min-height: 74px;
  border-top: 1px solid rgba(158, 208, 255, 0.12);
  background: #14202b;
  padding: 8px 12px;
}

.catalog-card:hover {
  background: #172636;
}

.catalog-thumb {
  display: grid;
  place-items: center;
  float: left;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 7px;
  background: #182532;
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  grid-column: 1;
  grid-row: 1;
}

.catalog-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-card-body {
  display: grid;
  gap: 2px;
  min-height: 0;
  grid-column: 1;
  grid-row: 1;
  padding-left: 72px;
  padding-right: 12px;
}

.catalog-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-card-body span {
  color: var(--green);
  font-weight: 900;
  font-size: 11px;
}

.catalog-card-body p,
.catalog-card-commerce small,
.catalog-card-commerce a {
  margin: 0;
  color: #c5d3df;
  font-size: 11px;
  line-height: 1.22;
}

.catalog-card-body strong,
.catalog-card-body p,
.catalog-card-commerce small {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.catalog-card-body strong {
  color: #f3f8fb;
  font-size: 13px;
  line-height: 1.18;
  -webkit-line-clamp: 1;
}

.catalog-card-body p {
  -webkit-line-clamp: 1;
}

.catalog-card-commerce small {
  -webkit-line-clamp: 1;
}

.catalog-card-commerce a {
  overflow: hidden;
  color: #9ed0ff;
  display: block;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card-kind {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.catalog-card-kind em,
.catalog-card-kind small {
  align-items: center;
  background: rgba(158, 208, 255, 0.1);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  gap: 4px;
  font-style: normal;
  font-weight: 900;
  font-size: 11px;
  min-width: 0;
  max-width: 110px;
  overflow: hidden;
  padding: 3px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card-kind small {
  color: #d7e8f7;
}

.catalog-card-commerce {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-card-commerce b {
  color: var(--green);
  font-size: 13px;
  line-height: 1.15;
}

.catalog-card-actions {
  align-items: center;
  background: transparent;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .reports-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-search {
    grid-column: 1 / -1;
  }

  .reports-grid,
  .reports-time-grid,
  .reports-panels {
    grid-template-columns: 1fr;
  }

  .report-chart-panel {
    grid-row: auto;
  }

  .report-kanban {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
  }

  .campaign-form-row,
  .campaign-rules,
  .campaign-targets,
  .campaign-history-tools,
  .campaign-message-editor,
  .ai-campaign-grid,
  .ai-campaign-preview header,
  .catalog-modal-grid {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar,
  .catalog-list-head,
  .catalog-card {
    grid-template-columns: 1fr;
  }

  .catalog-list-head {
    display: none;
  }

  .catalog-card {
    gap: 8px;
  }

  .catalog-card-kind,
  .catalog-card-commerce,
  .catalog-card-actions {
    padding-left: 72px;
    justify-content: flex-start;
  }

  .quick-reply-row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
  }

  .quick-reply-attachment {
    grid-column: 2 / 4;
    width: fit-content;
    max-width: 100%;
  }
}

.internal-notes-list {
  display: grid;
  gap: 8px;
  max-height: 118px;
  overflow-y: auto;
  padding-right: 4px;
}

.internal-note {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
}

.internal-note div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.internal-note strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-note time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.internal-note p {
  margin: 0;
  color: #eef6fb;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.internal-note button {
  justify-self: start;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce7ee;
  padding: 0 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.internal-note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.internal-note-form input {
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #18212a;
  color: var(--text);
  padding: 0 10px;
}

.internal-note-form button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #001f18;
  cursor: pointer;
  font-weight: 900;
}

.empty-note {
  color: var(--muted);
  font-size: 12px;
}

.details-section:has(.contact-summary) {
  padding-bottom: 42px;
}

.forms-builder {
  display: grid;
  gap: 10px;
  max-width: 1120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 0;
}

.custom-form-modal {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

.custom-form-modal .forms-builder {
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}

.custom-form-scroll {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding: 12px;
}

.custom-form-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #121b24;
  padding: 10px 12px;
}

.custom-form-footer .form-message {
  margin: 0;
}

.custom-form-footer .form-actions {
  flex: 0 0 auto;
}

.forms-builder-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.forms-builder label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.forms-builder input,
.forms-builder textarea,
.forms-builder select,
.form-field-row input,
.form-field-row textarea,
.form-field-row select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #101922;
  color: var(--text);
  padding: 8px 10px;
}

.forms-builder textarea {
  min-height: 64px;
  resize: vertical;
}

.forms-wide {
  grid-column: span 2;
}

.forms-banner-help {
  align-self: end;
  margin: 0;
  border: 1px solid rgba(158, 208, 255, 0.14);
  border-radius: 7px;
  background: rgba(158, 208, 255, 0.06);
  color: #8fa5b8;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.35;
}

.forms-fields-head,
.forms-actions,
.form-card-actions,
.form-records-head,
.form-record header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.forms-fields-head {
  justify-content: space-between;
  color: var(--accent);
}

.forms-fields-head button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: #ffffff;
  color: #071018;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 11px;
}

.forms-fields {
  display: grid;
  gap: 7px;
}

.form-field-row {
  display: grid;
  grid-template-columns: 1.15fr 0.75fr 142px 70px 84px 1.2fr 34px;
  gap: 7px;
  align-items: center;
}

.mini-check {
  display: flex !important;
  align-items: center;
  gap: 5px !important;
  white-space: nowrap;
}

.mini-check input {
  width: auto;
}

.forms-builder button,
.form-card-actions button,
.form-card-actions a,
.form-record button,
.form-record select,
.form-records-head a {
  border: 0;
  border-radius: 7px;
  background: #15212d;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
}

.forms-actions button:first-child {
  background: var(--green);
  color: #04120f;
}

.forms-stack {
  display: grid;
  gap: 8px;
  max-width: 1180px;
}

.forms-list,
.form-records-panel {
  display: grid;
  align-content: start;
  gap: 7px;
}

.forms-list {
  grid-template-columns: 1fr;
}

.form-card,
.form-record {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 10px;
}

.form-card {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(160px, 1fr) 70px 82px 80px auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
}

.form-card.selected {
  border-color: rgba(0, 188, 150, 0.78);
  background: rgba(0, 188, 150, 0.08);
}

.forms-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 260px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.015);
}

.forms-table-head {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(160px, 1fr) 70px 82px 80px auto;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(158, 208, 255, 0.05);
  color: #a9cfee;
  font-size: 12px;
  font-weight: 800;
  padding: 0 9px;
}

.forms-table .form-card {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.forms-table .form-card:last-child {
  border-bottom: 0;
}

.form-card-main {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.form-card-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-records-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.form-card span,
.form-card small,
.form-records-head span,
.form-empty {
  color: var(--muted);
}

.form-card span,
.form-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.form-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.form-card-actions .table-icon-button,
.form-record-actions .table-icon-button,
.form-records-actions .table-icon-button,
.form-record-modal-actions .table-icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: #15212d;
  color: #f4f8fb;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.form-card-actions .table-icon-button:hover,
.form-record-actions .table-icon-button:hover,
.form-records-actions .table-icon-button:hover,
.form-record-modal-actions .table-icon-button:hover {
  background: rgba(158, 208, 255, 0.14);
}

.form-card-actions .table-icon-button:last-child:hover,
.form-record-actions .table-icon-button:last-child:hover {
  color: #ff6b6b;
}

.table-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-records-head {
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 6px 9px;
  min-height: 34px;
}

.form-records-head strong {
  font-size: 13px;
}

.form-records-head span {
  font-size: 12px;
}

.form-records-actions,
.form-record-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.form-records-actions button {
  border: 0;
  border-radius: 7px;
  background: #15212d;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 5px 8px;
  font-size: 12px;
}

.form-records-actions a {
  padding: 5px 8px;
  font-size: 12px;
}

.form-records-actions .table-icon-button {
  min-height: 0;
  padding: 0;
}

.form-record-search {
  width: min(100%, 360px);
  height: 32px;
  margin: 0;
}

.form-record {
  display: grid;
  grid-template-columns: minmax(130px, 160px) minmax(0, 1fr) auto;
  gap: 6px 9px;
  align-items: center;
  padding: 7px 9px;
}

.form-record header {
  display: contents;
}

.form-record header > strong {
  grid-column: 1;
  color: #d7e8f5;
  font-size: 12px;
  line-height: 1.15;
}

.form-record-actions {
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-end;
  gap: 5px;
}

.form-record-actions button,
.form-record-actions select {
  min-height: 25px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11px;
}

.form-record-actions .table-icon-button {
  min-height: 0;
  padding: 0;
}

.form-record dl {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.form-record dl div {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.028);
  padding: 5px 7px;
  min-height: 38px;
}

.form-record dt {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.form-record dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.15;
}

.form-record dd button {
  border: 0;
  background: transparent;
  color: #00c49a;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
}

.form-record-summary {
  grid-template-columns: minmax(110px, 1fr) minmax(120px, 1fr) minmax(150px, 1fr) !important;
}

.form-record-details {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 8px;
}

.form-record-details summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.form-record-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.form-record-note textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #101922;
  color: var(--text);
  resize: vertical;
  padding: 8px 10px;
}

.form-record-note button {
  align-self: start;
}

.form-record-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

.form-record-modal-body {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 14px;
}

.form-record-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.form-record-modal-actions button,
.form-record-modal-actions select {
  border: 0;
  border-radius: 7px;
  background: #15212d;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 8px 10px;
}

.form-record-modal-actions .table-icon-button {
  min-height: 0;
  padding: 0;
}

.form-record-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.form-record-modal-grid div {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  padding: 9px;
}

@media (max-width: 900px) {
  .forms-builder-main,
  .forms-stack,
  .form-record-summary,
  .form-record dl,
  .form-record-modal-grid {
    grid-template-columns: 1fr;
  }

  .forms-wide {
    grid-column: auto;
  }

  .form-field-row,
  .form-card {
    grid-template-columns: 1fr;
  }

  .form-card-actions {
    flex-wrap: wrap;
  }
}

.followup-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.followup-kpis article,
.followup-tools,
.followup-calendar,
.followup-column,
.followup-card {
  border: 1px solid var(--line-soft);
  background: #14202a;
}

.followup-kpis article {
  display: grid;
  gap: 2px;
  border-radius: 10px;
  padding: 10px 12px;
}

.followup-kpis strong {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

.followup-kpis span,
.followup-card span,
.followup-card small,
.followup-card em,
.followup-calendar span,
.followup-calendar em {
  color: var(--muted);
  font-size: 11px;
}

.followup-kpis .is-alert strong {
  color: #ff6b6b;
}

.followup-tools {
  display: grid;
  grid-template-columns: 160px 160px 120px 130px minmax(220px, 1fr);
  gap: 10px;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.followup-tools select,
.followup-card select,
.followup-form input,
.followup-form select,
.followup-form textarea {
  border: 1px solid var(--line);
  background: #0d171f;
  color: var(--text);
}

.followup-tools select {
  height: 36px;
  border-radius: 999px;
  padding: 0 12px;
}

.followup-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.followup-column {
  border-radius: 12px;
  min-height: 260px;
  overflow: hidden;
}

.followup-column > header {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.followup-column > header span {
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: var(--stage);
}

.followup-column > header strong {
  font-size: 13px;
}

.followup-column > header em,
.followup-calendar em {
  font-style: normal;
}

.followup-column > div {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.followup-empty,
.followup-calendar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.followup-card {
  display: grid;
  gap: 6px;
  border-radius: 10px;
  padding: 9px;
}

.followup-card.is-overdue {
  border-color: rgba(255, 107, 107, 0.75);
  box-shadow: inset 3px 0 0 #ff6b6b;
}

.followup-card header,
.followup-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.followup-card header button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.followup-card header button:last-child {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0f1922;
  color: #c7e4ff;
}

.followup-card header svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.followup-card strong,
.followup-card span,
.followup-card p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.followup-card strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
}

.followup-card p {
  display: -webkit-box;
  min-height: 32px;
  margin: 0;
  color: #dcebf5;
  font-size: 12px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.followup-card select {
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  padding: 0 8px;
}

.followup-calendar {
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px;
}

.followup-calendar > strong {
  display: block;
  margin-bottom: 8px;
  color: #a8d4ff;
}

.followup-calendar > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.followup-calendar button {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #101a22;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.followup-modal {
  width: min(720px, calc(100vw - 28px));
}

.followup-form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.followup-form-section,
.followup-more > div {
  display: grid;
  gap: 10px;
}

.followup-status-section {
  grid-template-columns: minmax(180px, 1.15fr) minmax(115px, 0.65fr) minmax(150px, 0.9fr);
}

.followup-action-section {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.72fr) minmax(170px, 0.72fr);
}

.followup-more {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.followup-more summary {
  cursor: pointer;
  color: #9ed0ff;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 800;
}

.followup-more > div {
  grid-template-columns: minmax(160px, 1fr) 130px 120px;
  padding: 0 11px 11px;
}

.followup-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.followup-form input,
.followup-form select,
.followup-form textarea {
  width: 100%;
  border-radius: 8px;
  padding: 8px 10px;
}

.followup-form .wide-field {
  grid-column: 1 / -1;
}

.followup-form .confirm-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 3px;
}

.followup-form .confirm-modal-actions button {
  min-height: 36px;
  border-radius: 9px;
  padding: 0 13px;
  font-size: 13px;
}

.calls-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 12px;
}

.call-kpis {
  flex: 1 1 680px;
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.call-kpis article {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 9px;
}

.call-kpis strong {
  font-size: 18px;
}

.call-view-tabs {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.call-view-tabs button {
  border: 1px solid rgba(32, 208, 182, 0.34);
  border-radius: 999px;
  background: #101a24;
  color: #9ed0ff;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.call-view-tabs button.active {
  background: #20d0b6;
  color: #06231f;
}

.call-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  margin-bottom: 10px;
  overflow: visible;
}

.call-tools select {
  width: auto;
  min-width: 124px;
  max-width: 170px;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.call-tools input[type="date"] {
  width: 116px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0d171f;
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}

.call-tools .module-search {
  flex: 1 1 210px;
  min-width: 190px;
  max-width: 260px;
  height: 34px;
}

.call-tools .module-search input {
  height: 34px;
  font-size: 12px;
}

.call-tools .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.call-tools .secondary-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.call-ai-refresh,
.call-rules-button {
  margin-left: 0;
}

.calls-table-wrap td strong,
.calls-table-wrap td small {
  display: block;
}

.calls-table-wrap td small {
  color: var(--muted);
  font-size: 11px;
}

.priority-calls-table th:nth-child(3),
.priority-calls-table td:nth-child(3) {
  width: 34%;
}

.priority-summary-cell p {
  margin: 0 0 4px;
  color: #dcebf5;
  font-size: 12px;
  line-height: 1.35;
}

.priority-summary-cell small,
.priority-estimated {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.priority-estimated {
  margin-top: 4px;
}

.priority-call-list-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
}

.priority-call-list th,
.priority-call-list td {
  padding: 9px 10px;
  vertical-align: middle;
}

.priority-call-list th:nth-child(3),
.priority-call-list td:nth-child(3) {
  width: 34%;
}

.priority-client-cell strong,
.priority-action-cell strong,
.priority-call-list td > strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.priority-client-cell small,
.priority-action-cell small,
.priority-call-list td > small,
.priority-estimated {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.priority-action-cell strong {
  color: #dcebf5;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-action-cell small {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passive-actions-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  min-width: 0;
}

.passive-actions-summary article {
  display: grid;
  gap: 3px;
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #14202a;
  padding: 8px 10px;
}

.passive-actions-summary strong {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.passive-actions-summary span {
  color: var(--muted);
  font-size: 11px;
}

.passive-actions-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  margin-bottom: 0;
  min-width: 0;
}

.passive-actions-tools select {
  width: auto;
  min-width: 135px;
  max-width: 180px;
  height: 34px;
  font-size: 12px;
}

.passive-actions-tools .module-search {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
  height: 34px;
}

.passive-actions-tools .module-search input {
  height: 34px;
  font-size: 12px;
}

.passive-actions-tools .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.passive-actions-tools .secondary-button svg,
.passive-refresh-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.passive-refresh-button {
  max-width: 110px;
}

.passive-actions-wrap {
  max-height: calc(100vh - 315px);
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  width: 100%;
}

.passive-actions-table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

.passive-actions-table th,
.passive-actions-table td {
  padding: 8px 9px;
  vertical-align: middle;
  min-width: 0;
}

.passive-actions-table th:nth-child(1),
.passive-actions-table td:nth-child(1) {
  width: 14%;
}

.passive-actions-table th:nth-child(2),
.passive-actions-table td:nth-child(2) {
  width: 8%;
}

.passive-actions-table th:nth-child(3),
.passive-actions-table td:nth-child(3) {
  width: 27%;
}

.passive-actions-table th:nth-child(4),
.passive-actions-table td:nth-child(4) {
  width: 24%;
}

.passive-actions-table th:nth-child(5),
.passive-actions-table td:nth-child(5) {
  width: 9%;
}

.passive-actions-table th:nth-child(6),
.passive-actions-table td:nth-child(6) {
  width: 18%;
  min-width: 150px;
}

.passive-actions-table td > strong,
.passive-reason-cell strong,
.passive-action-cell strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passive-actions-table td > small,
.passive-reason-cell small,
.passive-action-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passive-reason-cell small,
.passive-action-cell small {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passive-actions-table .module-table-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.passive-actions-table .module-table-actions button {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 7px;
}

.passive-actions-table .module-table-actions svg {
  width: 14px;
  height: 14px;
}

.call-ai-refresh,
.call-rules-button {
  min-height: 36px;
  border-radius: 999px;
  white-space: nowrap;
  padding: 0 12px;
}

.call-ai-refresh svg,
.call-rules-button svg {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

.call-rules-modal {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.call-rules-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
  padding: 14px;
}

.call-rule-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-content: start;
}

.call-rule-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.call-rule-form input,
.call-rule-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d171f;
  color: var(--text);
  padding: 8px 10px;
}

.call-rule-form .wide-field,
.call-rule-form .confirm-modal-actions {
  grid-column: 1 / -1;
}

.call-rule-form .check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 9px;
  background: #101b25;
}

.call-rule-form .check-row input {
  width: auto;
}

.call-rules-list {
  display: grid;
  gap: 7px;
  align-content: start;
  max-height: 520px;
  overflow: auto;
}

.call-rules-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #101b25;
  padding: 8px 9px;
}

.call-rules-list article.is-muted {
  opacity: 0.55;
}

.call-rules-list strong,
.call-rules-list span {
  display: block;
}

.call-rules-list strong {
  color: var(--text);
  font-size: 13px;
}

.call-rules-list span {
  color: var(--muted);
  font-size: 11px;
}

.call-rules-list article > div:last-child {
  display: flex;
  align-items: center;
  gap: 5px;
}

.call-rules-list em {
  border-radius: 999px;
  background: #162636;
  color: #9ed0ff;
  padding: 3px 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.call-rules-list button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: #0b141d;
  color: var(--text);
  cursor: pointer;
}

.call-rules-list svg {
  width: 14px;
  height: 14px;
}

.interest-pill,
.interest-mini strong {
  color: #07120f;
  border-radius: 999px;
  background: #7f93ff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.interest-pill.tone-hot,
.interest-mini.tone-hot strong {
  background: #2bd67b;
}

.interest-pill.tone-warm,
.interest-mini.tone-warm strong {
  background: #f6c65b;
}

.interest-pill.tone-medium,
.interest-mini.tone-medium strong {
  background: #63b3ff;
}

.interest-pill.tone-cold,
.interest-mini.tone-cold strong {
  background: #9aa6b2;
}

.interest-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.interest-mini span,
.call-mini-items span {
  color: var(--muted);
  font-size: 11px;
}

.call-mini-items {
  display: grid;
  gap: 6px;
}

.call-history-open-button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: #101d28;
  color: #20d0b6;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  margin: 0 0 7px;
}

.call-history-open-button.primary {
  margin: 7px 0 0;
}

.call-history-open-button svg {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

.call-ai-summary,
.call-next-action {
  margin: 0 0 8px;
  color: #dcebf5;
  font-size: 12px;
  line-height: 1.35;
}

.call-next-action b {
  color: #9ed0ff;
}

.call-mini-items article {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0f1922;
  padding: 7px;
}

.call-mini-items b {
  color: var(--text);
  font-size: 12px;
}

.call-modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.call-history-modal {
  width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.call-history-summary {
  display: grid;
  gap: 10px;
  margin: 14px;
  border: 1px solid rgba(32, 208, 182, 0.24);
  border-radius: 12px;
  background: #0f1b24;
  padding: 12px;
}

.call-history-summary p {
  margin: 0;
  color: #dcebf5;
  font-size: 13px;
  line-height: 1.4;
}

.call-cadence-state {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #101d28;
  padding: 9px 10px;
}

.call-cadence-state strong,
.call-cadence-state span {
  display: block;
}

.call-cadence-state strong {
  color: #9ed0ff;
  font-size: 11px;
  text-transform: uppercase;
}

.call-cadence-state span {
  color: #e4f2fb;
  font-size: 12px;
  margin-top: 3px;
}

.call-cadence-state.tone-blocked,
.call-cadence-state.tone-risk {
  border-color: rgba(255, 107, 107, 0.45);
}

.call-cadence-state.tone-won {
  border-color: rgba(43, 214, 123, 0.45);
}

.call-history-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.call-history-kpis article {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #101d28;
  padding: 8px;
}

.call-history-kpis strong,
.call-history-kpis span {
  display: block;
}

.call-history-kpis strong {
  color: var(--text);
  font-size: 18px;
}

.call-history-kpis span {
  color: var(--muted);
  font-size: 11px;
}

.call-history-summary footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.call-history-summary footer button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: #20d0b6;
  color: #06231f;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.call-history-summary footer button:first-child {
  background: #162636;
  color: #9ed0ff;
}

.call-history-summary footer svg {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

.call-history-full-list {
  display: grid;
  gap: 9px;
  padding: 0 14px 14px;
}

.call-history-full-list article {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #101b25;
  padding: 10px;
}

.call-history-full-list header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.call-history-full-list strong,
.call-history-full-list span {
  display: block;
}

.call-history-full-list strong {
  color: var(--text);
  font-size: 14px;
}

.call-history-full-list span {
  color: var(--muted);
  font-size: 11px;
}

.call-history-full-list dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 8px;
}

.call-history-full-list dt {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.call-history-full-list dd {
  margin: 2px 0 0;
  color: #dcebf5;
  font-size: 12px;
}

.call-history-full-list p {
  margin: 5px 0 0;
  color: #dcebf5;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .call-rules-layout,
  .call-history-full-list dl {
    grid-template-columns: 1fr;
  }
}

.call-context-card {
  margin: 8px 14px 0;
  border: 1px solid rgba(32, 208, 182, 0.24);
  border-radius: 10px;
  background: #0f1b24;
  overflow: hidden;
}

.call-last-strip {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 10px 14px 0;
  padding: 8px 11px;
  border: 1px solid rgba(32, 208, 182, 0.24);
  border-radius: 10px;
  background: #0f1b24;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
}

.call-last-strip span {
  color: #9ed0ff;
  font-weight: 900;
  white-space: nowrap;
}

.call-last-strip strong {
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-last-strip em {
  color: #20d0b6;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-last-strip small {
  color: var(--muted);
  white-space: nowrap;
}

.call-last-strip.is-empty {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.call-last-strip.is-empty em {
  color: var(--muted);
}

.call-context-card summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.call-context-card summary::-webkit-details-marker {
  display: none;
}

.call-context-card summary::before {
  content: "▸";
  color: #20d0b6;
  font-size: 12px;
  transition: transform 0.18s ease;
}

.call-context-card[open] summary::before {
  transform: rotate(90deg);
}

.call-context-card summary span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.call-context-card summary small {
  color: var(--muted);
  font-size: 11px;
}

.call-context-card summary .interest-pill {
  margin-left: auto;
}

.call-context-body {
  border-top: 1px solid var(--line-soft);
  padding: 10px 12px 12px;
}

.call-context-card p {
  margin: 0 0 8px;
  color: #dcebf5;
  font-size: 13px;
  line-height: 1.4;
}

.call-context-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.call-context-card dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.call-context-card dd {
  margin: 2px 0 0;
  color: #dcebf5;
  font-size: 12px;
  line-height: 1.3;
}

.call-process-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 14px 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #101b25;
  padding: 8px 10px;
}

.call-process-link span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.call-process-link button {
  flex: 0 0 auto;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: #162636;
  color: #9ed0ff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.call-process-link svg {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

.call-context-card b {
  color: #9ed0ff;
}

.call-history-card {
  margin: 10px 14px 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0d171f;
  overflow: hidden;
}

.call-history-card summary {
  min-height: 40px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.call-history-card summary::-webkit-details-marker {
  display: none;
}

.call-history-card summary::before {
  content: "▸";
  color: #9ed0ff;
  font-size: 12px;
}

.call-history-card[open] summary::before {
  transform: rotate(90deg);
}

.call-history-card summary span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.call-history-card summary em {
  border-radius: 999px;
  background: #162636;
  color: #9ed0ff;
  padding: 3px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.call-history-card summary small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-history-body {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line-soft);
  padding: 10px 12px;
}

.call-history-body article {
  border-left: 3px solid #3f86ff;
  background: #101d28;
  border-radius: 8px;
  padding: 7px 9px;
}

.call-history-body.tone-blocked article,
.call-history-body.tone-risk article {
  border-left-color: #ff6b6b;
}

.call-history-body.tone-won article {
  border-left-color: #2bd67b;
}

.call-history-body.tone-scheduled article,
.call-history-body.tone-retry article {
  border-left-color: #f6c65b;
}

.call-history-body strong,
.call-history-body span,
.call-history-body small {
  display: block;
}

.call-history-body strong {
  color: var(--text);
  font-size: 12px;
}

.call-history-body span,
.call-history-body small {
  color: var(--muted);
  font-size: 11px;
}

.call-history-body p {
  margin: 4px 0 0;
  color: #dcebf5;
  font-size: 12px;
  line-height: 1.35;
}

.call-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.call-form-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.call-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.call-form input,
.call-form select,
.call-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d171f;
  color: var(--text);
  padding: 8px 10px;
}

.call-form .wide-field {
  grid-column: 1 / -1;
}

.call-agent-actions {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0f1b24;
  padding: 9px 10px;
}

.call-agent-actions strong {
  color: var(--text);
  font-size: 13px;
}

.call-agent-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.call-agent-actions button {
  min-height: 32px;
  border: 1px solid rgba(158, 208, 255, 0.22);
  border-radius: 999px;
  background: #101d28;
  color: #dcebf5;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.call-agent-actions svg {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

.call-support-panel {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.call-support-panel[hidden] {
  display: none;
}

.call-support-panel header,
.call-support-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.call-support-panel header button {
  min-height: 26px;
  width: 28px;
  padding: 0;
  border-radius: 8px;
}

.call-support-search {
  position: relative;
  display: block;
}

.call-support-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.call-support-command-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  color: #20d0b6;
  font-size: 14px;
  font-weight: 900;
  transform: translateY(-50%);
  pointer-events: none;
}

.call-support-search input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(158, 208, 255, 0.2);
  border-radius: 9px;
  background: #0b151e;
  color: var(--text);
  padding: 0 10px 0 32px;
  font-size: 12px;
  outline: none;
}

.call-support-command-prefix + input {
  padding-left: 26px;
}

.call-support-search input:focus {
  border-color: rgba(32, 208, 182, 0.65);
  box-shadow: 0 0 0 2px rgba(32, 208, 182, 0.12);
}

.call-support-list {
  display: grid;
  gap: 6px;
}

.call-support-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 8px;
  background: #0b151e;
  padding: 7px;
}

.call-support-list article[hidden] {
  display: none;
}

.call-support-list article div {
  min-width: 0;
}

.call-support-list strong,
.call-support-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-support-list strong {
  color: var(--text);
  font-size: 12px;
}

.call-support-list span {
  color: var(--muted);
  font-size: 11px;
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.call-support-list button {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

#scheduledModal {
  z-index: 90;
}

@media (max-width: 900px) {
  .followup-kpis,
  .followup-tools,
  .call-form,
  .followup-status-section,
  .followup-action-section,
  .followup-more > div {
    grid-template-columns: 1fr;
  }
}
