:root {
  color-scheme: light;
  --font-sans: Aptos, "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: Bahnschrift, "Aptos Display", "Segoe UI Variable Display", var(--font-sans);
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --bg: #f2f5f4;
  --bg-strong: #e7eeeb;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --surface-3: #eef4f2;
  --text: #16211e;
  --muted: #5c6b66;
  --line: #dce4e1;
  --line-strong: #c8d4d0;
  --accent: #0f766e;
  --accent-strong: #0b5e59;
  --accent-soft: #e2f3ef;
  --accent-line: #abd8cf;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --premium: #9c6f22;
  --premium-soft: #fff4d8;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --focus-ring: #0f766e;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(15, 23, 42, 0.05);
  --shadow-strong: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --rail-width: 238px;
  --topbar-height: 76px;
  --workspace-pad: 18px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1513;
  --bg-strong: #111a17;
  --surface: #16201d;
  --surface-2: #1c2825;
  --surface-3: #21302c;
  --text: #e7edeb;
  --muted: #93a39e;
  --line: #27342f;
  --line-strong: #32423c;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-line: rgba(45, 212, 191, 0.35);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --premium: #e8b85f;
  --premium-soft: rgba(232, 184, 95, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.14);
  --focus-ring: #2dd4bf;
  --shadow-soft: none;
  --shadow-strong: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg-strong), var(--bg));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

[x-cloak] {
  display: none !important;
}

:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-muted {
  color: var(--muted);
}

.page-shell {
  min-height: 100vh;
}

.button,
.icon-button,
.segmented button,
.nav-item,
.pill-button {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.button.primary {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f6fffd;
}

.button.primary:hover {
  filter: brightness(1.04);
}

.button.ghost {
  background: transparent;
}

.button.danger {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.button.soft {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-strong);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.textarea {
  min-height: 116px;
  resize: vertical;
}

.password-field {
  position: relative;
  display: block;
}

.password-field .input {
  padding-right: 46px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-field button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.password-field svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge,
.state-chip,
.tiny-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge {
  padding: 5px 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.badge.accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-strong);
}

.badge.ok {
  background: var(--ok-soft);
  border-color: transparent;
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-soft);
  border-color: transparent;
  color: var(--warn);
}

.badge.danger {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}

.badge.info {
  background: var(--info-soft);
  border-color: transparent;
  color: var(--info);
}

.tiny-chip {
  padding: 4px 8px;
  background: var(--surface-3);
  color: var(--muted);
}

.led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18);
}

.led.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.18);
}

.led.warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.18);
}

.led.danger {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18);
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.segmented button {
  min-width: 52px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.top-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .sidebar {
  background: rgba(12, 19, 17, 0.88);
}

.sidebar.admin {
  background: #101828;
  border-right-color: #1d2939;
  color: #e6edf7;
}

.sidebar.admin .nav-item,
.sidebar.admin .sidebar-card,
.sidebar.admin .workspace-link {
  color: #d0d8e6;
}

.sidebar.admin .nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: #e6edf7;
}

.sidebar.admin .sidebar-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e6edf7;
}

.brand-lockup {
  display: grid;
  gap: 6px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sidebar.admin .brand-pill {
  background: rgba(20, 184, 166, 0.12);
  color: #8fe9de;
}

.sidebar-meta {
  color: var(--muted);
  font-size: 12px;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-label {
  padding: 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-only {
  display: inline-grid;
  width: 42px;
  padding-inline: 0;
  place-items: center;
}

.sidebar-brand-row {
  position: relative;
}

.sidebar-collapse {
  position: absolute;
  top: 0;
  right: 0;
}

.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.sidebar-collapsed .brand-pill {
  width: 44px;
  overflow: hidden;
  color: transparent;
}

.sidebar-collapsed .brand-pill::first-letter {
  color: var(--accent-strong);
}

.sidebar-collapsed .brand-lockup > div:not(.brand-pill),
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-text,
.sidebar-collapsed .sidebar-card,
.sidebar-collapsed .nav-item .badge {
  display: none;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-inline: 0;
}

.sidebar-collapsed .sidebar-collapse {
  top: 50px;
  right: 8px;
  transform: rotate(180deg);
}

.nav-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  font-size: 17px;
}

.today-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.top-indicator {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.top-indicator-icon {
  color: var(--muted);
  font-size: 18px;
}

.indicator-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 240px;
  transform: translateX(-50%);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
  font-size: 12px;
  white-space: normal;
}

.dense-table {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.dense-table table {
  width: 100%;
  border-collapse: collapse;
}

.dense-table th,
.dense-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.dense-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dense-table tr:last-child td,
.dense-table tr:last-child th {
  border-bottom: 0;
}

.table-secondary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.table-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right !important;
}

.table-actions .icon-button {
  min-width: 34px;
  min-height: 34px;
  width: 34px;
  height: 34px;
}

.table-preview {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-text {
  color: var(--danger);
}

.resource-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}

.resource-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.resource-form > .form-grid {
  padding: 18px;
}

.resource-form label {
  display: grid;
  gap: 6px;
}

.audit-table {
  max-width: 720px;
}

.nav-item:hover,
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sidebar.admin .nav-item:hover,
.sidebar.admin .nav-item.active {
  background: #1d2d44;
  color: #f8fbff;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 18px var(--workspace-pad);
  background: rgba(242, 245, 244, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 228, 225, 0.85);
}

:root[data-theme="dark"] .topbar {
  background: rgba(14, 21, 19, 0.86);
  border-bottom-color: rgba(39, 52, 47, 0.95);
}

.workspace-body {
  padding: var(--workspace-pad);
  display: grid;
  gap: 16px;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card,
.panel,
.hero-card,
.sidebar-card,
.inbox-shell,
.modal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card,
.panel,
.hero-card,
.sidebar-card {
  padding: 14px;
}

.card.kpi {
  padding-top: 10px;
  border-top: 3px solid var(--accent);
}

.card.kpi h3,
.chart-card h3,
.panel h3 {
  margin: 0;
  font-size: 14px;
}

.kpi-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.kpi-footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.95), rgba(8, 47, 73, 0.95));
  color: #effffb;
  box-shadow: var(--shadow-strong);
}

.hero-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.02;
}

.hero p {
  margin: 0 0 18px;
  max-width: 68ch;
  color: rgba(239, 255, 251, 0.82);
}

.hero-metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metric {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.landing-layout {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.landing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.plan-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 32px;
  font-weight: 800;
}

.list-reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.dt-container {
  min-width: 100%;
  color: var(--text);
}

.dt-container .dt-layout-row {
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  background: var(--surface);
}

.dt-container .dt-layout-row:first-child {
  border-bottom: 1px solid var(--line);
}

.dt-container .dt-layout-row:last-child {
  border-top: 1px solid var(--line);
}

.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info {
  color: var(--muted);
  font-size: 12px;
}

.dt-container .dt-input {
  min-height: 36px;
  margin: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.dt-container .dt-search .dt-input {
  width: min(260px, 36vw);
  padding: 7px 10px;
}

.dt-container .dt-length .dt-input {
  padding: 6px 28px 6px 8px;
}

.dt-container .dt-input:focus {
  border-color: var(--focus-ring);
  outline: 2px solid color-mix(in srgb, var(--focus-ring) 24%, transparent);
  outline-offset: 1px;
}

.dt-container .dt-paging .dt-paging-button {
  min-width: 36px;
  min-height: 36px;
  margin: 0 2px;
  padding: 7px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 9px;
  color: var(--muted) !important;
  background: transparent !important;
  font-size: 12px;
}

.dt-container .dt-paging .dt-paging-button:hover:not(.disabled),
.dt-container .dt-paging .dt-paging-button.current {
  border-color: var(--accent-line) !important;
  color: var(--accent-strong) !important;
  background: var(--accent-soft) !important;
}

.dt-container .dt-paging .dt-paging-button.disabled {
  opacity: .42;
}

.dt-container table.dataTable {
  margin: 0 !important;
  border-spacing: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr:hover {
  background: var(--surface-2);
}

.inbox-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 0;
  min-height: calc(100vh - 184px);
  overflow: hidden;
}

.inbox-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.inbox-column + .inbox-column {
  border-left: 1px solid var(--line);
}

.inbox-toolbar,
.detail-header,
.rail-header,
.composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.inbox-filters {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.conversation-list,
.message-list,
.contact-rail,
.activity-list {
  min-height: 0;
  overflow: auto;
}

.conversation-item {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}

.conversation-item:hover,
.conversation-item.active {
  background: var(--accent-soft);
}

.conversation-item.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.conversation-head,
.message-meta,
.rail-row,
.inline-row,
.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.toggle-row input:disabled {
  cursor: not-allowed;
}

.conversation-head {
  justify-content: space-between;
}

.conversation-name {
  font-weight: 700;
}

.conversation-preview {
  color: var(--muted);
  font-size: 12px;
}

.message-list {
  padding: 18px 18px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.25)),
    linear-gradient(135deg, rgba(239, 234, 226, 0.65), rgba(240, 248, 244, 0.85));
}

:root[data-theme="dark"] .message-list {
  background:
    linear-gradient(180deg, rgba(22, 32, 29, 0.8), rgba(22, 32, 29, 0.8)),
    linear-gradient(135deg, rgba(28, 40, 37, 1), rgba(17, 26, 23, 1));
}

.message-stack {
  display: grid;
  gap: 12px;
}

.message-group {
  display: flex;
  width: 100%;
}

.message-group.outbound {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(84%, 860px);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 8px;
}

.message-group.outbound .message-bubble {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.message-group.whisper .message-bubble {
  background: #fff7cc;
  border-color: #ead77a;
}

:root[data-theme="dark"] .message-group.whisper .message-bubble {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.22);
}

.message-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.attachment-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--line-strong);
}

.composer {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 12px;
}

.composer-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.3fr);
}

.composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slash-menu,
.mention-list,
.modal-backdrop,
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 12, 0.48);
}

.overlay-panel {
  position: relative;
  margin: 4vh auto;
  width: min(960px, calc(100vw - 32px));
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.floating-menu {
  position: absolute;
  inset: auto 0 100% 0;
  margin-bottom: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.floating-menu button {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.floating-menu button:last-child {
  border-bottom: 0;
}

.floating-menu button:hover,
.floating-menu button.active {
  background: var(--accent-soft);
}

.contact-rail {
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.rail-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.progress-row {
  display: grid;
  gap: 8px;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.empty-state,
.error-state,
.loading-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.flash-list {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.flash.ok {
  border-color: rgba(21, 128, 61, 0.2);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.login-panel {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.login-panel.hero-pane {
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.22), transparent 26%),
    linear-gradient(145deg, #0d2f2b, #0b1220);
  color: #edfdfa;
}

.marketing-auth,
.admin-auth {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 64px);
}

.marketing-auth {
  position: relative;
  background:
    radial-gradient(circle at 15% 15%, rgba(223, 244, 234, .9), transparent 32%),
    radial-gradient(circle at 90% 85%, rgba(232, 93, 63, .1), transparent 28%),
    var(--marketing-paper);
}

.marketing-auth > .marketing-brand {
  position: absolute;
  top: 24px;
  left: clamp(20px, 5vw, 64px);
}

.marketing-auth-card,
.admin-auth-card {
  width: min(100%, 480px);
  border: 1px solid var(--marketing-line, var(--line));
  border-radius: 26px;
  background: var(--marketing-paper, var(--surface));
  box-shadow: 0 28px 80px rgba(18, 60, 51, .12);
  overflow: hidden;
}

.marketing-auth-intro {
  padding: 34px 34px 22px;
  background: var(--marketing-cream);
}

.marketing-auth-intro h1,
.admin-auth-card h1 {
  margin: 5px 0 10px;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.08;
}

.marketing-auth-intro p:last-child {
  margin: 0;
  color: var(--marketing-muted);
}

.marketing-auth-form {
  display: grid;
  gap: 18px;
  padding: 28px 34px;
}

.marketing-auth-form label:not(.checkbox-line) {
  display: grid;
  gap: 7px;
  font-weight: 650;
}

.marketing-auth-links,
.marketing-auth-foot {
  font-size: 14px;
}

.marketing-auth-links {
  text-align: right;
}

.turnstile-field {
  min-height: 65px;
  overflow: hidden;
}

.marketing-auth-links a,
.marketing-auth-foot a,
.mfa-secret a {
  color: var(--marketing-green, var(--accent));
  font-weight: 700;
}

.marketing-auth-foot {
  margin: 0;
  padding: 18px 34px 24px;
  border-top: 1px solid var(--marketing-line, var(--line));
  text-align: center;
  color: var(--marketing-muted, var(--muted));
}

.auth-error,
.auth-success {
  padding: 11px 13px;
  border-radius: 11px;
}

.auth-error {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.auth-success {
  margin: 0 34px 28px;
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  background: var(--ok-soft);
}

.auth-success .marketing-button {
  margin-top: 14px;
}

.admin-auth {
  background:
    radial-gradient(circle at 20% 0, rgba(15, 118, 110, .15), transparent 30%),
    var(--bg);
}

.admin-auth-card {
  border-color: var(--line);
  background: var(--surface);
}

.admin-auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 34px;
  border-bottom: 1px solid var(--line);
}

.mfa-secret {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
}

.mfa-secret code {
  overflow-wrap: anywhere;
  font-size: 15px;
  letter-spacing: .08em;
}

.mfa-code {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: .25em;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-line input {
  margin-top: 2px;
}

.mobile-toggle {
  display: none;
}

.chart-wrap {
  position: relative;
  min-height: 290px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 290px !important;
}

.help-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1199px) {
  .inbox-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .inbox-column.rail {
    display: none;
  }
}

@media (max-width: 1040px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
  }

  .topbar {
    padding-inline: 14px;
  }

  .tenant-shell .topbar,
  .admin-shell .topbar {
    flex-wrap: wrap;
  }

  .tenant-shell .topbar > .action-row:last-child,
  .admin-shell .topbar > .action-row:last-child {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .workspace-body,
  .landing-layout {
    padding: 14px;
  }

  .hero-grid,
  .login-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inbox-shell {
    grid-template-columns: 1fr;
  }

  .inbox-column {
    max-height: 42vh;
    border-bottom: 1px solid var(--line);
  }

  .detail {
    min-height: 60vh;
  }

  .contact-rail {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .marketing-auth,
  .admin-auth {
    place-items: start center;
    padding: 84px 14px 24px;
  }

  .marketing-auth > .marketing-brand {
    top: 22px;
    left: 18px;
  }

  .marketing-auth-card,
  .admin-auth-card {
    border-radius: 20px;
  }

  .marketing-auth-intro,
  .marketing-auth-form {
    padding-inline: 22px;
  }

  .topbar > .action-row {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    padding: 18px;
  }

  .hero-metric-grid,
  .card-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .composer-grid {
    grid-template-columns: 1fr;
  }

  .inbox-toolbar {
    display: grid;
    align-items: stretch;
  }

  .inbox-filters {
    grid-template-columns: 1fr 1fr;
    padding: 0;
    border: 0;
  }

  .page-title {
    font-size: 22px;
  }

  .button,
  .icon-button {
    min-height: 44px;
  }

  .table-wrap table {
    min-width: 620px;
  }

  .dt-container .dt-layout-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .dt-container .dt-layout-cell {
    width: 100%;
    text-align: left !important;
  }

  .dt-container .dt-search {
    display: grid;
  }

  .dt-container .dt-search .dt-input {
    width: 100%;
    margin: 0;
  }

  .dt-container .dt-paging {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .today-indicators {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .tenant-shell .topbar,
  .admin-shell .topbar {
    display: grid;
    gap: 8px;
    padding-block: 10px;
  }

  .tenant-shell .topbar > .action-row,
  .admin-shell .topbar > .action-row {
    width: 100%;
    flex-wrap: nowrap;
  }

  .tenant-shell .topbar > .action-row:last-child,
  .admin-shell .topbar > .action-row:last-child {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .tenant-shell .topbar > .action-row:last-child > *,
  .admin-shell .topbar > .action-row:last-child > * {
    flex: 0 0 auto;
  }

  .tenant-shell .topbar > .action-row:last-child > span.badge,
  .admin-shell .topbar > .action-row:last-child > span.badge {
    display: none;
  }

  .top-indicator {
    flex: 0 0 auto;
  }

  .indicator-popover {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .resource-modal {
    align-items: end;
    padding: 0;
  }

  .resource-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }
}

/* Native operator workspace */
.operator-body {
  margin: 0;
  overflow: hidden;
  background: #e9edef;
  color: #17212b;
}

.operator-app {
  --op-green: #075e54;
  --op-green-bright: #00a884;
  --op-chat: #efeae2;
  --op-surface: #fff;
  --op-soft: #f0f2f5;
  --op-line: #e1e7ea;
  --op-muted: #667781;
  height: 100dvh;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  overflow: hidden;
  background: var(--op-surface);
}

.operator-commandbar {
  min-width: 0;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #fff;
  background: var(--op-green);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.operator-brand,
.operator-brand-cluster,
.operator-command-status,
.chat-actions,
.chat-badges,
.conversation-primary,
.conversation-secondary,
.conversation-cues,
.message-origin,
.native-bubble footer {
  display: flex;
  align-items: center;
}

.operator-brand { gap: 0.55rem; }
.operator-brand-cluster { gap: .65rem; min-width: 0; }
.operator-brand .marketing-brand-mark { width: 32px; height: 32px; flex: 0 0 32px; display: inline-grid; place-items: center; border-radius: 10px; color: #fff; background: #00a884; box-shadow: 0 4px 12px rgba(0,0,0,.18); font-weight: 900; }
.operator-brand > div { display: grid; line-height: 1; gap: 0.15rem; }
.operator-brand small { color: rgba(255,255,255,.7); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.operator-demo-plan { max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tenant-panel-brand { display: inline-flex; align-items: center; gap: .48rem; }
.tenant-panel-brand .marketing-brand-mark { width: 34px; height: 34px; flex: 0 0 34px; display: inline-grid; place-items: center; border-radius: 10px; color: #fff; background: #00a884; font-weight: 900; }
.tenant-panel-brand > strong { font-size: 1rem; letter-spacing: -.02em; }
.tenant-demo-plan { grid-column: 1 / -1; width: max-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-command-status { min-width: 0; gap: 0.4rem; }

.operator-icon-button,
.operator-action,
.composer-icon,
.template-button,
.send-button {
  border: 0;
  cursor: pointer;
  color: inherit;
}

.operator-icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
}

.operator-icon-button:hover,
.operator-icon-button:focus-visible { background: rgba(255,255,255,.14); }
.operator-icon-button.wide { width: auto; padding: 0 .65rem; display: inline-flex; gap: .4rem; border-radius: 6px; text-decoration: none; }
.operator-icon-button .ui-icon { width: 18px; height: 18px; }
.operator-icon-button:disabled { cursor: default; opacity: .72; }
.operator-icon-button.notification-enable.active { color: #062e2a; background: #9ff4d3; }
.operator-icon-button.demo-reset {
  height: 34px;
  color: #fff;
  background: #c62828;
  border: 1px solid rgba(255,255,255,.24);
  font-weight: 800;
}
.operator-icon-button.demo-reset:hover,
.operator-icon-button.demo-reset:focus-visible { background: #a91f1f; }

.op-badge {
  min-height: 24px;
  padding: .2rem .55rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid #d6dde1;
  border-radius: 999px;
  color: #3b4a54;
  background: #fff;
  font-family: inherit;
  font-size: .7rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.op-badge.compact { min-height: 19px; padding: .13rem .4rem; font-size: .62rem; }
.op-badge.demo { color: #fff; background: #9a6700; border-color: #b68113; }
.op-badge.online { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }

.operator-user-dropdown { position: relative; flex: 0 0 auto; }
.operator-user-trigger {
  min-height: 36px;
  max-width: 230px;
  padding: .2rem .45rem .2rem .25rem;
  display: flex;
  align-items: center;
  gap: .42rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.1);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.operator-user-trigger:hover,
.operator-user-trigger:focus-visible,
.operator-user-trigger[aria-expanded="true"] { background: rgba(255,255,255,.18); }
.operator-user-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--op-green);
  background: #d9fdd3;
  font-size: .72rem;
  font-weight: 850;
}
.operator-profile-copy { min-width: 0; display: grid; line-height: 1.05; }
.operator-profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.operator-profile-copy small { margin-top: .16rem; color: rgba(255,255,255,.72); font-size: .56rem; }
.operator-menu-chevron { width: 14px; height: 14px; flex: 0 0 14px; transition: transform .16s ease; }
.operator-user-trigger[aria-expanded="true"] .operator-menu-chevron { transform: rotate(180deg); }
.operator-user-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + .45rem);
  right: 0;
  width: min(290px, calc(100vw - 1rem));
  overflow: hidden;
  border: 1px solid var(--op-line);
  border-radius: 12px;
  color: #17212b;
  background: var(--op-surface);
  box-shadow: 0 16px 38px rgba(15,23,42,.24);
}
.operator-user-menu-identity { padding: .85rem; display: grid; gap: .18rem; border-bottom: 1px solid var(--op-line); }
.operator-user-menu-identity strong { font-size: .8rem; }
.operator-user-menu-identity span { overflow: hidden; color: var(--op-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.operator-user-menu-identity small { color: var(--op-green); font-size: .62rem; font-weight: 800; }
.operator-logout-button {
  width: 100%;
  min-height: 42px;
  padding: .65rem .85rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  color: #b42318;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .74rem;
  font-weight: 800;
  text-align: left;
}
.operator-logout-button:hover,
.operator-logout-button:focus-visible { background: #fff1f0; }
.operator-logout-button:disabled { cursor: wait; opacity: .65; }
.operator-logout-button .ui-icon { width: 18px; height: 18px; }
:root[data-theme="dark"] .operator-user-menu { color: #e9edef; background: #202c33; border-color: #33444d; }
:root[data-theme="dark"] .operator-user-menu-identity { border-color: #33444d; }
:root[data-theme="dark"] .operator-logout-button:hover,
:root[data-theme="dark"] .operator-logout-button:focus-visible { background: rgba(180,35,24,.18); }

.language-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.language-select select {
  min-height: 36px;
  padding: 0 2rem 0 .7rem;
  border: 1px solid var(--line, #d0d5dd);
  border-radius: 8px;
  color: inherit;
  background: var(--surface, #fff);
  font: 500 .8rem/1 inherit;
  cursor: pointer;
}
.language-select.compact select { min-height: 34px; padding-left: .55rem; }
.operator-action,
.operator-icon-button.wide,
.button,
.marketing-button,
.demo-access-card {
  font-size: max(.8rem, 13px);
  font-weight: 500;
}
.op-badge.age { background: #f2f4f5; }
.op-badge.window { color: #05603a; background: #e8f7ef; border-color: #bce4ce; }
.op-badge.template { color: #8a4b00; background: #fff4dd; border-color: #f2d299; }
.op-badge.internal { color: #775b00; background: #fff4bd; border-color: #ead77a; }
.op-badge.agent { color: #05603a; background: #d9fdd3; border-color: #b4e9ac; }
.op-badge.customer { color: #2f5f83; background: #e8f3fb; border-color: #c7dfef; }
.op-badge.plan-lock { color: #713f12; background: #fef3c7; border-color: #f5c451; letter-spacing: .035em; }
.op-badge.plan-lock b { color: #b77900; font-size: .78rem; }

.presence-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 2px rgba(37,211,102,.15);
}

.presence-dot.offline { background: #98a2b3; box-shadow: none; }
.presence-dot.busy { background: #f59e0b; }

.operator-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 510px minmax(0, 1fr);
  overflow: hidden;
}

.operator-queue,
.operator-chat {
  min-width: 0;
  min-height: 0;
  background: var(--op-surface);
}

.native-chat-header { grid-row: 1; }
.collision-strip { grid-row: 1; }
.native-message-list { grid-row: 2; }
.native-composer { grid-row: 3; }

.operator-queue {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--op-line);
}

.queue-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--op-line);
  background: var(--op-soft);
}

.queue-tabs button {
  min-width: 0;
  padding: .55rem .35rem .45rem;
  display: grid;
  grid-template-columns: 17px minmax(0,1fr) auto;
  align-items: center;
  gap: .25rem;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--op-muted);
  background: transparent;
  cursor: pointer;
  font-size: .68rem;
  text-align: left;
}

.queue-tabs button.active { color: var(--op-green); background: #fff; border-bottom-color: var(--op-green-bright); }
.queue-tabs button strong { min-width: 20px; padding: .12rem .3rem; border-radius: 999px; background: #dfe5e7; font-size: .62rem; text-align: center; }
.queue-tabs .urgent-count { color: #fff; background: #d92d20; }
.queue-tabs .ui-icon { width: 16px; height: 16px; }

.queue-tabs button.attention-pulse {
  animation: queue-attention 1.15s ease-in-out 2;
}

@keyframes queue-attention {
  50% { color: #fff; background: #d92d20; box-shadow: inset 0 -3px #7a271a; }
}

.queue-quick-filters {
  padding: .42rem .5rem 0;
  display: flex;
  gap: .3rem;
  overflow-x: auto;
}

.queue-quick-filters button {
  min-height: 30px;
  padding: .28rem .52rem;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #475467;
  background: #fff;
  font: inherit;
  font-size: .63rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.queue-quick-filters button.active { color: #05603a; background: #dff7ee; border-color: #75cdb8; }
.queue-quick-filters button.locked { color: #7a6b43; background: #f8f5ec; opacity: .72; cursor: not-allowed; }
.queue-quick-filters button b { color: #d4a72c; }

.queue-search {
  margin: .5rem;
  padding: 0 .65rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  border-radius: 7px;
  background: var(--op-soft);
}

.queue-search .ui-icon { width: 16px; color: var(--op-muted); }
.queue-search input { width: 100%; height: 34px; border: 0; outline: 0; color: inherit; background: transparent; font-size: .78rem; }
.native-list { min-height: 0; overflow-y: auto; }

.native-conversation {
  width: 100%;
  min-width: 0;
  padding: .62rem .68rem;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: .6rem;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  color: inherit;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.native-conversation:hover { background: #f5f7f8; }
.native-conversation.active { background: #e9edef; box-shadow: inset 3px 0 var(--op-green-bright); }
.native-conversation.response-pending { background: #fff9db; }
.native-conversation.response-pending:hover { background: #fff4bd; }
.native-conversation.response-overdue { background: #fff0ee; }
.native-conversation.response-overdue:hover { background: #ffe4e0; }
.native-conversation.response-pending.active,
.native-conversation.response-overdue.active { box-shadow: inset 4px 0 var(--op-green-bright); }
.contact-avatar { width: 40px; height: 40px; display: inline-grid; place-items: center; flex: 0 0 40px; border-radius: 50%; color: #fff; background: #7b9e9a; font-weight: 800; }
.native-conversation-copy { min-width: 0; display: grid; gap: .24rem; }
.conversation-primary { justify-content: space-between; gap: .5rem; }
.conversation-primary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.conversation-public-id { color: var(--op-muted); font-size: .68em; font-weight: 750; font-variant-numeric: tabular-nums; }
.conversation-primary time { flex: 0 0 auto; color: var(--op-muted); font-size: .62rem; }
.conversation-secondary { min-width: 0; gap: .4rem; color: var(--op-muted); font-size: .72rem; }
.conversation-secondary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-secondary b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--op-green-bright); font-size: .6rem; }
.conversation-cues { min-width: 0; gap: .25rem; overflow: hidden; }
.tag-dot-label { display: inline-flex; align-items: center; gap: .2rem; color: var(--op-muted); font-size: .61rem; white-space: nowrap; }
.tag-dot-label i { width: 6px; height: 6px; border-radius: 50%; }

.load-more-button {
  min-height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  border: 0;
  border-top: 1px solid var(--op-line);
  color: var(--op-green);
  background: #fff;
  cursor: pointer;
  font-weight: 750;
}
.load-more-button small { color: var(--op-muted); }

.operator-chat {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  overflow: hidden;
}

.operator-chat-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  overflow: hidden;
  transition: grid-template-columns .24s cubic-bezier(.2,.8,.2,1);
}

.operator-chat-body.context-open {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
}

.operator-chat-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.native-chat-header {
  min-width: 0;
  padding: 0 .65rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  background: var(--op-soft);
  border-bottom: 1px solid var(--op-line);
}

.native-chat-header .contact-avatar { width: 36px; height: 36px; flex-basis: 36px; }
.chat-identity { min-width: 0; flex: 1; display: grid; gap: .13rem; }
.chat-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.chat-name-line,
.chat-meta-row,
.chat-phone { min-width: 0; display: flex; align-items: center; gap: .3rem; }
.chat-name-line strong { min-width: 0; }
.rename-contact { width: 25px; height: 25px; flex: 0 0 25px; display: inline-grid; place-items: center; border: 1px solid #f4c430; border-radius: 50%; color: #7a5200; background: #ffe680; box-shadow: 0 2px 6px rgba(122,82,0,.18); cursor: pointer; font-size: .72rem; }
.rename-contact:hover { color: #533800; background: #ffd84d; }
.chat-meta-row { flex-wrap: wrap; color: var(--op-muted); font-size: .66rem; }
.chat-phone { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-phone.phone-badge { width: max-content; max-width: 230px; padding: .2rem .48rem; color: #344054; background: #e9edef; border: 1px solid #d0d5dd; }
.chat-badges { gap: .25rem; flex-wrap: wrap; }
.chat-actions { gap: .25rem; }
.operator-action { height: 36px; min-width: 86px; min-height: 36px; padding: 0 .45rem; display: inline-flex; align-items: center; justify-content: center; gap: .28rem; border-radius: 7px; color: #344054; background: #fff; border: 1px solid #d0d5dd; font-family: inherit; font-size: .7rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.operator-action.history-action { min-width: 112px; }
.operator-action:hover { background: #f8fafb; }
.operator-action.locked { color: #7c8490; background: #eef1f3; border-color: #d7dce0; cursor: not-allowed; }
.feature-crown { color: #c69214; font-size: .75rem; }
.operator-action.claim { color: #fff; background: var(--op-green); border-color: var(--op-green); }
.operator-action.success { color: #05603a; background: #e8f7ef; border-color: #bce4ce; }
.operator-action.context-toggle.active { color: #05603a; background: #dff7ee; border-color: #8ed9c2; }
.operator-action .ui-icon { width: 15px; height: 15px; }
.action-popover-wrap { position: relative; }

.native-popover {
  position: absolute;
  right: 0;
  z-index: 40;
  min-width: 270px;
  padding: .45rem;
  border: 1px solid var(--op-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16,24,40,.18);
}

.operator-picker { top: calc(100% + .4rem); display: grid; gap: .25rem; }
.operator-picker > strong, .operator-picker > small { padding: 0 .35rem; }
.operator-picker > small { color: var(--op-muted); font-size: .65rem; }
.operator-picker-section { display: grid; gap: .3rem; padding-top: .15rem; }
.operator-picker-heading {
  padding: 0 .35rem;
  color: var(--op-muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.operator-picker-empty {
  padding: .25rem .35rem .1rem;
  color: var(--op-muted);
  font-size: .63rem;
}
.operator-picker button { width: 100%; padding: .45rem; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: .5rem; border: 0; border-radius: 6px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.operator-picker button:hover { background: var(--op-soft); }
.operator-picker button > span:nth-child(2) { display: grid; }
.operator-picker button small { color: var(--op-muted); font-size: .62rem; }
.operator-picker em { color: var(--op-muted); font-size: .62rem; font-style: normal; }

.collision-strip { min-height: 30px; padding: .3rem .75rem; display: flex; align-items: center; gap: .35rem; color: #854d0e; background: #fffbeb; border-bottom: 1px solid #fde68a; font-size: .7rem; }
.native-message-list { min-height: 0; padding: .75rem max(.75rem, 5vw); overflow-y: auto; background-color: var(--op-chat); background-image: radial-gradient(rgba(7,94,84,.04) 1px, transparent 1px); background-size: 18px 18px; scroll-behavior: smooth; }
.older-messages { margin: 0 auto .6rem; padding: .3rem .65rem; display: block; border: 1px solid #d8d5ce; border-radius: 999px; color: #54656f; background: rgba(255,255,255,.9); cursor: pointer; font-size: .66rem; }
.conversation-start-marker, .conversation-end-marker { width: max-content; max-width: 90%; margin: .35rem auto .7rem; padding: .28rem .55rem; display: flex; align-items: center; gap: .35rem; border-radius: 6px; color: #54656f; background: #fff; box-shadow: 0 1px 1px rgba(11,20,26,.08); font-size: .62rem; }
.conversation-end-marker { color: #05603a; background: #e8f7ef; }
.conversation-end-marker .ui-icon { width: 14px; }
.native-message { display: flex; margin: .18rem 0; }
.native-message.outbound { justify-content: flex-end; }
.native-message.internal { justify-content: center; }
.native-bubble { position: relative; max-width: min(78%, 620px); padding: .42rem .5rem .3rem; border-radius: 7px; background: #fff; box-shadow: 0 1px 1px rgba(11,20,26,.12); }
.native-message.outbound .native-bubble { background: #d9fdd3; }
.native-message.internal .native-bubble { width: min(90%, 680px); background: #fff4bd; border: 1px solid #ead77a; }
.message-origin { gap: .3rem; margin-bottom: .18rem; }
.message-origin strong { color: #54656f; font-size: .62rem; }
.native-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.35; }
.native-bubble footer { justify-content: flex-end; gap: .28rem; margin-top: .12rem; color: #667781; font-size: .56rem; }
.native-attachment { margin: .3rem 0; padding: .4rem; display: flex; align-items: center; gap: .4rem; border-radius: 6px; color: inherit; background: rgba(255,255,255,.55); text-decoration: none; }
.native-attachment .ui-icon { width: 16px; }

.native-composer { position: relative; padding: .35rem .5rem max(.35rem, env(safe-area-inset-bottom)); display: grid; gap: .28rem; background: var(--op-soft); border-top: 1px solid var(--op-line); }
.composer-mode { min-height: 20px; display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: var(--op-muted); font-size: .62rem; }
.composer-mode label { display: flex; align-items: center; gap: .28rem; }
.composer-entry { display: grid; grid-template-columns: 46px 46px minmax(0,1fr) 46px 46px 52px; align-items: end; gap: .4rem; }
.composer-icon { position: relative; width: 46px; height: 46px; display: inline-grid; place-items: center; border: 1px solid #d7e1e4; border-radius: 50%; color: #3f6268; background: #edf6f5; font-size: 1.25rem; cursor: pointer; }
.composer-icon:hover { color: #075e54; background: #dff0ed; border-color: #a9d4cb; }
.composer-icon .ui-icon { width: 20px; }
.composer-icon.locked { color: #7c8490; background: #eef1f3; border-color: #d7dce0; cursor: not-allowed; opacity: 1; }
.composer-feature-crown { position: absolute; top: -5px; right: -4px; min-width: 17px; height: 17px; display: inline-grid; place-items: center; border: 1px solid #e4bd54; border-radius: 50%; color: #8a6100; background: #fff3c4; box-shadow: 0 1px 3px rgba(122,82,0,.16); font-size: .62rem; line-height: 1; }
.composer-entry textarea { width: 100%; min-width: 0; min-height: 84px; max-height: 170px; padding: .65rem .8rem; resize: vertical; border: 1px solid #d7e1e4; border-radius: 16px; outline: 0; color: inherit; background: #fff; font: inherit; font-size: .82rem; line-height: 1.4; }
.composer-entry textarea:focus { border-color: #75cdb8; box-shadow: 0 0 0 3px rgba(0,168,132,.12); }
.template-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #7ed3b8;
  border-radius: 50%;
  color: #0b5a4f;
  background: #d8f6ef;
  font-size: .68rem;
  font-weight: 800;
}
.template-button:hover { background: #c9f0e7; border-color: #68c4b2; }
.template-button .ui-icon { width: 16px; }
.template-button > span { display: none; }
.send-button { width: 52px; height: 52px; display: inline-grid; place-items: center; border: 1px solid #00866b; border-radius: 50%; color: #fff; background: #00a884; box-shadow: 0 4px 12px rgba(0,128,105,.3); cursor: pointer; }
.send-button:hover { background: #008f72; transform: translateY(-1px); }
.send-button:disabled { opacity: .42; cursor: not-allowed; }
.send-button .ui-icon { width: 18px; }
.audio-button.recording { color: #fff; background: #d92d20; border-color: #b42318; animation: recording-pulse 1.2s ease-in-out infinite; }
.recording-strip { padding: .3rem .55rem; display: flex; align-items: center; justify-content: flex-end; gap: .4rem; color: #b42318; font-size: .68rem; font-weight: 750; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: #d92d20; }
.recording-strip time { min-width: 34px; font-variant-numeric: tabular-nums; }
@keyframes recording-pulse { 50% { box-shadow: 0 0 0 5px rgba(217,45,32,.16); } }
.emoji-picker { bottom: calc(100% + .4rem); left: 0; right: auto; min-width: 220px; display: grid; grid-template-columns: repeat(6, 1fr); }
.emoji-picker button { padding: .25rem; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; }
.template-drawer { position: absolute; inset: auto .5rem calc(100% + .35rem) .5rem; z-index: 35; max-height: 280px; overflow-y: auto; border: 1px solid var(--op-line); border-radius: 8px; background: #fff; box-shadow: 0 -10px 30px rgba(16,24,40,.16); }
.template-drawer > div { position: sticky; top: 0; padding: .55rem .65rem; display: flex; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--op-line); }
.template-drawer > div button { border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; }
.template-drawer > button { width: 100%; padding: .5rem .65rem; display: grid; grid-template-columns: 70px minmax(0,1fr); gap: .5rem; border: 0; border-bottom: 1px solid #eef1f2; color: inherit; background: #fff; text-align: left; cursor: pointer; }
.template-drawer > button:hover { background: var(--op-soft); }
.template-drawer > button > span { display: grid; gap: .12rem; }
.template-drawer small { color: var(--op-muted); }
.composer-attachments { display: flex; gap: .3rem; overflow-x: auto; }
.composer-attachments > span { padding: .2rem .4rem; display: inline-flex; gap: .3rem; border-radius: 5px; background: #fff; font-size: .65rem; white-space: nowrap; }
.composer-attachments button { border: 0; background: transparent; cursor: pointer; }
.slash-drawer { position: absolute; inset: auto .5rem calc(100% + .35rem) .5rem; z-index: 36; max-height: 210px; overflow-y: auto; border: 1px solid var(--op-line); border-radius: 8px; background: #fff; box-shadow: 0 -10px 30px rgba(16,24,40,.16); }
.slash-drawer button { width: 100%; padding: .55rem .7rem; display: grid; grid-template-columns: 90px minmax(0,1fr); gap: .6rem; border: 0; border-bottom: 1px solid #eef1f2; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.slash-drawer button:hover { background: var(--op-soft); }

.operator-context {
  position: relative;
  z-index: 30;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-rows: 46px 42px minmax(0,1fr);
  background: #fff;
  border-left: 1px solid var(--op-line);
  box-shadow: -8px 0 24px rgba(16,24,40,.08);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(24px);
  transition: transform .24s cubic-bezier(.2,.8,.2,1), opacity .18s ease, visibility 0s linear .24s;
  will-change: transform;
}
.operator-context.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}
.operator-context > header { padding: 0 .75rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--op-line); }
.operator-context > header button { border: 0; background: transparent; cursor: pointer; font-size: 1.35rem; }
.context-tabs { padding: 0 .5rem; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: end; gap: .25rem; background: #f8fafb; border-bottom: 1px solid var(--op-line); }
.context-tabs button { min-width: 0; height: 41px; padding: 0 .35rem; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; border: 0; border-bottom: 2px solid transparent; color: #667781; background: transparent; cursor: pointer; font-size: .72rem; font-weight: 750; }
.context-tabs button.active { color: var(--op-green); border-bottom-color: var(--op-green-bright); background: #fff; }
.context-tabs button b { color: #a36e00; font-size: .7rem; }
.context-scroll { min-height: 0; overflow-y: auto; }
.context-tab-panel { min-height: 100%; }
.operator-context details { border-bottom: 1px solid var(--op-line); }
.operator-context summary { padding: .72rem .75rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; cursor: pointer; font-size: .79rem; font-weight: 800; list-style: none; }
.operator-context summary::-webkit-details-marker { display: none; }
.operator-context summary .ui-icon { width: 15px; transition: transform .18s ease; }
.operator-context details[open] summary .ui-icon { transform: rotate(90deg); }
.operator-context details > :not(summary) { margin-left: .75rem; margin-right: .75rem; }
.compact-facts { padding-bottom: .65rem; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.compact-facts span { min-width: 0; display: grid; gap: .08rem; color: var(--op-muted); font-size: .66rem; }
.compact-facts strong { overflow: hidden; text-overflow: ellipsis; color: #344054; font-size: .74rem; }
.tag-picker { padding-bottom: .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.tag-picker button { padding: .25rem .45rem; display: inline-flex; align-items: center; gap: .28rem; border: 1px solid #d0d5dd; border-radius: 999px; color: #475467; background: #fff; cursor: pointer; font-size: .66rem; }
.tag-picker button.active { color: var(--op-green); background: #e8f7ef; border-color: #7bd5b5; }
.tag-picker button:disabled, .outcome-choice button:disabled, .context-primary:disabled { opacity: .48; cursor: not-allowed; }
.tag-picker i { width: 7px; height: 7px; border-radius: 50%; }
.operator-context details > small { display: block; padding-bottom: .65rem; color: var(--op-muted); font-size: .66rem; line-height: 1.45; }
.outcome-choice { padding-bottom: .5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.outcome-choice button { padding: .55rem .35rem; display: grid; place-items: center; gap: .15rem; border: 1px solid #d0d5dd; border-radius: 7px; color: #475467; background: #fff; cursor: pointer; text-align: center; }
.outcome-choice button:first-child.active { color: #05603a; background: #e8f7ef; border-color: #7bd5b5; }
.outcome-choice button:last-child.active { color: #b42318; background: #fff0ee; border-color: #f7b4ac; }
.outcome-choice .ui-icon { width: 18px; }
.outcome-choice strong { font-size: .7rem; }
.outcome-choice span { font-size: .58rem; }
.context-form { padding-bottom: .55rem; display: grid; gap: .45rem; }
.context-form label { display: grid; gap: .25rem; color: var(--op-muted); font-size: .68rem; font-weight: 650; }
.context-form input, .context-form select, .context-form textarea, .context-textarea { width: 100%; min-height: 34px; padding: .4rem .5rem; border: 1px solid #d0d5dd; border-radius: 6px; color: #344054; background: #fff; font: inherit; font-size: .74rem; line-height: 1.4; }
.inline-fields { display: grid; grid-template-columns: 1fr 58px; gap: .3rem; }
.context-primary, .context-secondary { width: calc(100% - 1.5rem); min-height: 34px; margin: 0 .75rem .65rem; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: .7rem; font-weight: 750; line-height: 1; }
.context-primary { border: 0; color: #fff; background: var(--op-green); }
.context-secondary { border: 1px solid #b8c1c7; color: #344054; background: #fff; }
.context-form .context-secondary { width: 100%; margin: 0; }
.context-inline-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .35rem; }
.context-inline-action button { min-width: 58px; border: 1px solid #80cdb8; border-radius: 6px; color: #075e54; background: #e6f6f1; cursor: pointer; font-size: .68rem; font-weight: 750; }
.context-inline-action button:disabled { opacity: .5; cursor: not-allowed; }
.crm-email-form .context-primary { width: 100%; margin: .1rem 0 0; }
.crm-email-history { margin: .1rem .75rem .7rem; padding: .55rem; display: grid; gap: .35rem; border-radius: 7px; background: var(--op-soft); }
.crm-email-history > strong { font-size: .68rem; }
.crm-email-history > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .66rem; }
.crm-email-history small { padding: .12rem .32rem; border-radius: 999px; color: #05603a; background: #dff7ee; font-size: .58rem; }
.crm-email-history small.failed { color: #b42318; background: #fff0ee; }
.context-help, .context-empty-note { color: var(--op-muted); font-size: .66rem; line-height: 1.4; }
.context-empty-note { padding: .4rem; border-radius: 6px; background: var(--op-soft); }
.operator-context details.locked > :not(summary) { opacity: .68; }
.operator-context details summary .plan-lock { margin-left: auto; }
.plan-badge-list { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem; }
.tenant-shell .tenant-config-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: start;
}
.tenant-shell .tenant-lock-card {
  align-items: flex-start;
  justify-items: flex-start;
}
.tenant-shell .tenant-area-member-layout,
.tenant-shell .tenant-schedule-grid {
  display: grid;
  gap: 12px;
}
.tenant-shell .tenant-area-member-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.tenant-shell .tenant-area-member-stack,
.tenant-shell .tenant-schedule-block-stack {
  display: grid;
  gap: 10px;
}
.tenant-shell .tenant-area-member-card,
.tenant-shell .tenant-schedule-day,
.tenant-shell .tenant-area-pick {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.tenant-shell .tenant-area-member-card,
.tenant-shell .tenant-schedule-day {
  padding: 14px;
}
.tenant-shell .tenant-schedule-day {
  display: grid;
  gap: 10px;
}
.tenant-shell .tenant-schedule-day-head,
.tenant-shell .tenant-schedule-block-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tenant-shell .tenant-schedule-block-row .input {
  min-width: 0;
}
.tenant-shell .tenant-schedule-block-row .icon-button {
  flex: 0 0 38px;
}
.tenant-shell .tenant-area-pick {
  width: 100%;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.tenant-shell .tenant-area-pick:hover {
  background: var(--surface-2);
}
.tenant-shell .table-preview {
  display: inline-block;
  max-width: 320px;
}
.context-form hr { width: 100%; border: 0; border-top: 1px solid var(--op-line); }
.sentiment-result { padding: .5rem; display: flex; align-items: center; gap: .55rem; border-radius: 7px; background: #f5f7f8; }
.sentiment-result.positive { background: #e8f7ef; }
.sentiment-result.negative { background: #fff0ee; }
.sentiment-face { font-size: 1.4rem; }
.sentiment-result > div { display: grid; gap: .1rem; }
.sentiment-result strong { text-transform: capitalize; font-size: .72rem; }
.sentiment-result small { color: var(--op-muted); font-size: .61rem; }
.intent-result { padding: .55rem; display: flex; align-items: center; gap: .55rem; border-radius: 7px; background: #edf7f5; }
.intent-symbol { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 50%; color: #075e54; background: #d7f0ea; font-size: 1.15rem; font-weight: 900; }
.intent-result > div { display: grid; gap: .1rem; min-width: 0; }
.intent-result strong { font-size: .74rem; text-transform: capitalize; }
.intent-result small { color: var(--op-muted); font-size: .61rem; line-height: 1.35; }
.intent-evidence { margin: .4rem .75rem .55rem; display: flex; flex-wrap: wrap; gap: .25rem; }
.intent-evidence span { padding: .15rem .38rem; border-radius: 999px; color: #075e54; background: #e1f4ef; font-size: .58rem; font-weight: 700; }
.relation-row { margin-bottom: .4rem !important; padding: .35rem; display: flex; align-items: center; gap: .35rem; border-radius: 5px; background: var(--op-soft); font-size: .62rem; }
.context-scrim { display: none; }
.operator-loading, .operator-error, .operator-empty, .operator-no-selection { place-items: center; text-align: center; }
.operator-loading { position: fixed; inset: 52px 0 0; z-index: 90; display: grid; align-content: center; gap: .6rem; background: #fff; }
.operator-error { position: fixed; z-index: 100; inset: 60px 1rem auto; padding: .6rem; display: grid; color: #b42318; background: #fff0ee; border: 1px solid #f7b4ac; }
.operator-empty { padding: 2rem 1rem; display: grid; gap: .35rem; color: var(--op-muted); }
.operator-empty .ui-icon { width: 28px; }
.operator-empty strong { color: #344054; }
.mobile-back { display: none; }

:root[data-theme="dark"] .operator-app {
  --op-surface: #111b21;
  --op-soft: #202c33;
  --op-line: #2a3942;
  --op-muted: #8696a0;
  color: #e9edef;
}
:root[data-theme="dark"] .operator-body { background: #0b141a; }
:root[data-theme="dark"] .native-conversation,
:root[data-theme="dark"] .load-more-button,
:root[data-theme="dark"] .native-popover,
:root[data-theme="dark"] .template-drawer,
:root[data-theme="dark"] .template-drawer > div,
:root[data-theme="dark"] .template-drawer > button,
:root[data-theme="dark"] .operator-context { background: var(--op-surface); color: #e9edef; }
:root[data-theme="dark"] .context-tabs { background: #18252c; }
:root[data-theme="dark"] .context-tabs button.active { color: #58d7b5; background: #202c33; }
:root[data-theme="dark"] .native-conversation:hover,
:root[data-theme="dark"] .native-conversation.active { background: #202c33; }
:root[data-theme="dark"] .native-message-list { background-color: #0b141a; }
:root[data-theme="dark"] .native-bubble { color: #e9edef; background: #202c33; }
:root[data-theme="dark"] .native-message.outbound .native-bubble { background: #005c4b; }
:root[data-theme="dark"] .conversation-start-marker,
:root[data-theme="dark"] .older-messages { color: #b9c8cf; background: #1c2930; border-color: #344650; }
:root[data-theme="dark"] .message-origin strong,
:root[data-theme="dark"] .native-bubble footer { color: #b9c8cf; }
:root[data-theme="dark"] .native-conversation { border-bottom-color: #202c33; }
:root[data-theme="dark"] .native-chat-header,
:root[data-theme="dark"] .native-composer,
:root[data-theme="dark"] .queue-tabs,
:root[data-theme="dark"] .queue-search { border-color: #26363f; }
:root[data-theme="dark"] .queue-tabs button.active { color: #58d7b5; background: #18252c; }
:root[data-theme="dark"] .queue-tabs button strong { color: #dce5e9; background: #31414a; }
:root[data-theme="dark"] .operator-action,
:root[data-theme="dark"] .context-secondary,
:root[data-theme="dark"] .tag-picker button,
:root[data-theme="dark"] .outcome-choice button,
:root[data-theme="dark"] .context-form input,
:root[data-theme="dark"] .context-form select,
:root[data-theme="dark"] .context-form textarea,
:root[data-theme="dark"] .context-textarea,
:root[data-theme="dark"] .composer-entry textarea,
:root[data-theme="dark"] .template-button,
:root[data-theme="dark"] .composer-attachments > span {
  color: #e9edef;
  background: #202c33;
  border-color: #3b4a54;
}
:root[data-theme="dark"] .operator-action:hover,
:root[data-theme="dark"] .tag-picker button:hover { background: #293840; }
:root[data-theme="dark"] .operator-action.claim,
:root[data-theme="dark"] .context-primary { color: #fff; background: #087f6c; border-color: #087f6c; }
:root[data-theme="dark"] .operator-action.success,
:root[data-theme="dark"] .tag-picker button.active,
:root[data-theme="dark"] .outcome-choice button:first-child.active { color: #a8f0da; background: #143b34; border-color: #267c69; }
:root[data-theme="dark"] .operator-action.context-toggle.active,
:root[data-theme="dark"] .template-button,
:root[data-theme="dark"] .composer-icon { color: #a8f0da; background: #173b35; border-color: #267c69; }
:root[data-theme="dark"] .slash-drawer { color: #e9edef; background: #111b21; border-color: #2a3942; }
:root[data-theme="dark"] .outcome-choice button:last-child.active { color: #ffb4aa; background: #412420; border-color: #7d3c35; }
:root[data-theme="dark"] .compact-facts strong,
:root[data-theme="dark"] .operator-empty strong { color: #e9edef; }
:root[data-theme="dark"] .sentiment-result,
:root[data-theme="dark"] .relation-row { background: #1c2930; }
:root[data-theme="dark"] .operator-context details,
:root[data-theme="dark"] .operator-context > header,
:root[data-theme="dark"] .template-drawer > div,
:root[data-theme="dark"] .template-drawer > button { border-color: #26363f; }
:root[data-theme="dark"] .op-badge:not(.plan-lock):not(.demo):not(.online) { color: #dce5e9; background: #26363f; border-color: #3b4a54; }
:root[data-theme="dark"] .op-badge.window { color: #a8f0da; background: #143b34; border-color: #267c69; }
:root[data-theme="dark"] .op-badge.template { color: #ffd699; background: #4a3518; border-color: #755625; }
:root[data-theme="dark"] .operator-loading { color: #e9edef; background: #111b21; }
:root[data-theme="dark"] .operator-error { color: #ffb4aa; background: #412420; border-color: #7d3c35; }
:root[data-theme="dark"] .central-swal { color: #e9edef; background: #202c33; }
:root[data-theme="dark"] .swal2-title,
:root[data-theme="dark"] .swal2-html-container { color: #e9edef; }
:root[data-theme="dark"] .swal2-input { color: #e9edef; background: #111b21; border-color: #3b4a54; }

.operator-history-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  padding: 4vh 4vw;
  display: grid;
  place-items: center;
  background: rgba(11,20,26,.58);
  backdrop-filter: blur(3px);
}
.operator-history-dialog {
  width: min(920px, 94vw);
  height: min(720px, 88dvh);
  display: grid;
  grid-template-rows: 54px minmax(0,1fr);
  overflow: hidden;
  border: 1px solid var(--op-line);
  border-radius: 14px;
  color: inherit;
  background: var(--op-surface);
  box-shadow: 0 26px 80px rgba(11,20,26,.35);
}
.operator-history-dialog > header { padding: 0 .9rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--op-line); }
.operator-history-dialog > header > div { display: grid; gap: .1rem; }
.operator-history-dialog > header small { color: var(--op-muted); }
.operator-history-dialog > header button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: inherit; background: transparent; cursor: pointer; font-size: 1.25rem; }
.history-layout { min-height: 0; display: grid; grid-template-columns: 280px minmax(0,1fr); }
.history-conversations { min-height: 0; overflow-y: auto; border-right: 1px solid var(--op-line); }
.history-conversations > button { width: 100%; padding: .75rem; display: grid; gap: .3rem; border: 0; border-bottom: 1px solid var(--op-line); color: inherit; background: transparent; text-align: left; cursor: pointer; }
.history-conversations > button.active { background: var(--op-soft); box-shadow: inset 3px 0 var(--op-green-bright); }
.history-conversations > button span { display: flex; justify-content: space-between; color: var(--op-muted); font-size: .68rem; }
.history-messages { position: relative; min-height: 0; padding: .8rem 1rem; overflow-y: auto; background: var(--op-chat); }
.history-message { width: min(78%, 580px); margin: .25rem 0; padding: .5rem .6rem; border-radius: 8px; background: var(--op-surface); box-shadow: 0 1px 2px rgba(11,20,26,.13); }
.history-message.outbound { margin-left: auto; background: #d9fdd3; }
.history-message.internal { margin-left: auto; margin-right: auto; background: #fff4bd; }
.history-message strong,
.history-message time { color: var(--op-muted); font-size: .62rem; }
.history-message p { margin: .2rem 0; white-space: pre-wrap; font-size: .78rem; }
.operator-loading.inline { position: absolute; inset: 0; z-index: 2; background: rgba(255,255,255,.72); }
:root[data-theme="dark"] .operator-history-dialog { background: #111b21; border-color: #2a3942; }
:root[data-theme="dark"] .history-message { background: #202c33; }
:root[data-theme="dark"] .history-message.outbound { background: #005c4b; }
:root[data-theme="dark"] .history-message.internal { color: #211b00; background: #c9b458; }
:root[data-theme="dark"] .operator-loading.inline { background: rgba(17,27,33,.72); }

@media (max-width: 1050px) {
  .operator-workspace { grid-template-columns: 390px minmax(0,1fr); }
  .chat-badges { display: flex; }
  .operator-chat-body.context-open { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); }
}

@media (max-width: 800px) {
  #tenant-tags-table,
  #tenant-loss-reasons-table { min-width: 0; width: 100%; }
  #tenant-tags-table th:nth-child(2),
  #tenant-tags-table td:nth-child(2),
  #tenant-loss-reasons-table th:nth-child(3),
  #tenant-loss-reasons-table td:nth-child(3) { display: none; }
  #tenant-tags-table,
  #tenant-loss-reasons-table { table-layout: fixed; }
  #tenant-tags-table th,
  #tenant-tags-table td,
  #tenant-loss-reasons-table th,
  #tenant-loss-reasons-table td { padding: 8px; }
  #tenant-tags-table .table-actions,
  #tenant-loss-reasons-table .table-actions { width: 82px; white-space: nowrap; }
  #tenant-tags-table .icon-button,
  #tenant-loss-reasons-table .icon-button { width: 34px; min-width: 34px; min-height: 34px; }
  .operator-app { grid-template-rows: 48px minmax(0,1fr); }
  .operator-commandbar { padding: 0 .45rem; }
  .operator-brand small, .operator-profile-copy, .operator-icon-button.wide span { display: none; }
  .operator-user-trigger { width: 36px; padding: .2rem; justify-content: center; }
  .operator-menu-chevron { display: none; }
  .operator-icon-button.wide { width: 34px; padding: 0; justify-content: center; }
  .operator-icon-button.demo-reset { width: auto; padding: 0 .5rem; border-radius: 7px; }
  .operator-icon-button.demo-reset span { display: inline; font-size: .62rem; }
  .operator-workspace { display: block; }
  .operator-queue, .operator-chat { position: absolute; inset: 0; }
  .mobile-hidden { display: none !important; }
  .mobile-back { display: inline-grid; color: #344054; }
  .native-chat-header { padding: 0 .35rem; gap: .35rem; }
  .native-chat-header .contact-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .chat-identity { max-width: 145px; }
  .chat-phone { max-width: 112px; }
  .chat-badges .op-badge { font-size: .55rem; }
  .operator-action { width: 32px; padding: 0; justify-content: center; }
  .operator-action { min-width: 32px; }
  .operator-action span { display: none; }
  .chat-actions { gap: .12rem; }
  .native-message-list { padding-inline: .55rem; }
  .native-bubble { max-width: 88%; }
  .composer-mode > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .operator-chat-body,
  .operator-chat-body.context-open { display: block; }
  .operator-chat-main { height: 100%; }
  .composer-entry { grid-template-columns: 34px 34px minmax(0,1fr) 36px 34px 36px; gap: .16rem; }
  .composer-icon { width: 34px; height: 36px; }
  .composer-entry textarea { min-height: 58px; }
  .template-button { width: 36px; padding: 0; justify-content: center; }
  .template-button span { display: none; }
  .send-button { width: 36px; height: 36px; }
  .operator-context { position: fixed; inset: 48px 0 0; z-index: 80; width: 100%; max-width: none; transform: translateX(100%); }
  .context-scrim { position: fixed; inset: 48px 0 0; z-index: 70; display: block; background: rgba(11,20,26,.35); backdrop-filter: blur(2px); }
  .operator-picker { position: fixed; inset: 110px .5rem auto; max-height: 60vh; overflow-y: auto; }
  .operator-command-status .op-badge.demo { display: none; }
  .operator-history-modal { padding: 0; place-items: stretch; }
  .operator-history-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .history-layout { grid-template-columns: 118px minmax(0,1fr); }
  .history-conversations > button { padding: .6rem .45rem; }
  .history-conversations > button strong { font-size: .68rem; }
  .history-message { width: 92%; }
  .tenant-shell .tenant-config-layout,
  .tenant-shell .tenant-area-member-layout {
    grid-template-columns: 1fr;
  }
  .tenant-shell .tenant-area-pick,
  .tenant-shell .tenant-schedule-day-head,
  .tenant-shell .tenant-schedule-block-row {
    align-items: stretch;
    flex-direction: column;
  }
  .tenant-shell .table-preview {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .operator-command-status .op-badge.demo { max-width: 105px; }
  .queue-tabs button { grid-template-columns: 15px minmax(0,1fr); }
  .queue-tabs button strong { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Public marketing site. Intentionally isolated from the application theme. */
.marketing-page {
  --marketing-ink: #10231e;
  --marketing-muted: #5e6d67;
  --marketing-green: #123c33;
  --marketing-green-2: #1b5c4d;
  --marketing-mint: #dff4ea;
  --marketing-cream: #f7f3ea;
  --marketing-paper: #fffdf9;
  --marketing-coral: #e85d3f;
  --marketing-line: #d9ded9;
  margin: 0;
  background: var(--marketing-paper);
  color: var(--marketing-ink);
  font-size: 16px;
}

.marketing-page,
.marketing-page * {
  color-scheme: light;
}

.marketing-site {
  min-height: 100vh;
  overflow: clip;
  background: var(--marketing-paper);
}

.marketing-container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.marketing-header {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  width: min(1180px, calc(100% - 48px));
  min-height: 82px;
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(16, 35, 30, 0.12);
}

.marketing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--marketing-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.marketing-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px 10px 10px 3px;
  background: var(--marketing-green);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.marketing-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.marketing-nav a,
.marketing-login {
  color: #344c44;
  font-size: 14px;
  font-weight: 650;
}

.marketing-nav a:hover,
.marketing-login:hover,
.marketing-text-link:hover {
  color: var(--marketing-coral);
}

.marketing-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.marketing-demo-nav {
  min-height: 42px;
  margin-top: 82px;
  padding: 0.55rem clamp(1rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #f4fbf8;
  background: var(--marketing-green);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
}

.marketing-demo-nav > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
}

.marketing-demo-nav > span > span:first-child {
  color: var(--marketing-coral);
  font-size: 0.65rem;
}

.marketing-demo-nav a {
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.marketing-demo-nav a:hover,
.marketing-demo-nav a:focus-visible {
  color: #f7d9b8;
}

.marketing-demo-nav small {
  color: rgba(255, 255, 255, 0.72);
}

.demo-login-notice {
  margin-top: 1rem;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  color: var(--marketing-ink);
  background: #edf8f3;
  border: 1px solid #bddfd3;
  border-left: 4px solid var(--marketing-green);
}

.demo-login-notice > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.demo-login-notice p {
  margin: 0;
  font-size: 0.88rem;
}

.demo-login-badge {
  padding: 0.25rem 0.5rem;
  color: #fff;
  background: var(--marketing-green);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-login-notice dl {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.demo-login-notice dl > div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.75rem;
}

.demo-login-notice dt {
  color: #567069;
  font-size: 0.75rem;
  font-weight: 700;
}

.demo-login-notice dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.demo-login-switcher {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.demo-login-switcher a {
  color: var(--marketing-green);
  font-size: 0.78rem;
  font-weight: 800;
}

.demo-mode-badge {
  max-width: 15rem;
}

.demo-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(223, 244, 234, 0.72), transparent 300px),
    var(--marketing-paper);
}

.demo-selector {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
  padding-bottom: 56px;
}

.demo-selector-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(16, 35, 30, 0.12);
}

.demo-selector-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.demo-back-link {
  color: var(--marketing-green);
  font-size: 14px;
  font-weight: 750;
}

.demo-back-link:hover,
.demo-back-link:focus-visible {
  color: var(--marketing-coral);
}

.demo-selector-intro {
  max-width: 790px;
  padding: 64px 0 44px;
}

.demo-selector-intro h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  color: var(--marketing-ink);
  font-size: clamp(38px, 5.4vw, 64px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.demo-selector-intro > p:not(.marketing-eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--marketing-muted);
  font-size: 18px;
  line-height: 1.6;
}

.demo-company {
  width: fit-content;
  margin-top: 28px;
  padding: 10px 16px 10px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #bcd8ce;
  background: #fff;
}

.demo-company > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--marketing-green);
  font-weight: 850;
}

.demo-company small,
.demo-company strong {
  display: block;
}

.demo-company small {
  color: var(--marketing-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-company strong {
  margin-top: 2px;
  color: var(--marketing-ink);
  font-size: 15px;
}

.demo-role-section {
  padding: 30px 0 34px;
  border-top: 1px solid var(--marketing-line);
}

.demo-role-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.demo-role-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #bcd8ce;
  background: var(--marketing-mint);
  color: var(--marketing-green);
}

.demo-role-icon.tenant {
  border-color: #ead7bd;
  background: #fff5e8;
  color: #8b572a;
}

.demo-role-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.demo-role-heading h2 {
  margin: 0;
  color: var(--marketing-ink);
  font-size: 24px;
  letter-spacing: -0.025em;
}

.demo-role-heading p {
  margin: 4px 0 0;
  color: var(--marketing-muted);
  font-size: 14px;
}

.demo-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.demo-access-card {
  position: relative;
  min-height: 132px;
  padding: 20px;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 5px;
  border: 1px solid #cad5d0;
  border-radius: 10px;
  color: var(--marketing-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.demo-access-card::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  content: "→";
  color: var(--marketing-green);
  font-size: 22px;
  font-weight: 700;
}

.demo-access-card:hover:not(:disabled),
.demo-access-card:focus-visible {
  z-index: 1;
  border-color: var(--marketing-green);
  box-shadow: 0 12px 28px rgba(18, 60, 51, 0.13);
  transform: translateY(-2px);
  outline: none;
}

.demo-access-card.featured {
  border-color: #82b7a4;
  background: #f2faf6;
}

.demo-access-card:disabled {
  cursor: wait;
  opacity: 0.64;
}

.demo-access-card > span:not(.demo-plan-name) {
  font-size: 16px;
  font-weight: 800;
}

.demo-plan-name {
  color: var(--marketing-green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-access-card small {
  max-width: calc(100% - 28px);
  color: var(--marketing-muted);
  font-size: 12px;
  line-height: 1.45;
}

.demo-access-card b {
  margin-top: 5px;
  color: var(--marketing-coral);
  font-size: 11px;
}

.demo-selector-note {
  margin: 10px 0 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid var(--marketing-green);
  color: #486058;
  background: #edf8f3;
  font-size: 13px;
}

.demo-selector-note span:first-child {
  color: var(--marketing-coral);
}

.demo-selector-error {
  margin-top: 14px;
}

.marketing-language {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(16, 35, 30, 0.16);
  border-radius: 999px;
}

.marketing-language button {
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--marketing-muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.marketing-language button[aria-pressed="true"] {
  background: var(--marketing-green);
  color: #fff;
}

.marketing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--marketing-green);
  border-radius: 10px;
  background: var(--marketing-green);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.marketing-button:hover {
  transform: translateY(-2px);
  background: var(--marketing-green-2);
  box-shadow: 0 10px 26px rgba(18, 60, 51, 0.18);
}

.marketing-button.compact {
  min-height: 40px;
  padding-inline: 17px;
  border-radius: 8px;
  font-size: 13px;
}

.marketing-button.light {
  border-color: #fff;
  background: #fff;
  color: var(--marketing-green);
}

.marketing-button.full {
  width: 100%;
}

.marketing-hero {
  position: relative;
  padding: 150px 0 90px;
  background:
    linear-gradient(90deg, rgba(18, 60, 51, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(18, 60, 51, 0.035) 1px, transparent 1px),
    var(--marketing-cream);
  background-size: 44px 44px;
}

.marketing-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(223, 244, 234, 0.8);
  filter: blur(3px);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  align-items: center;
  gap: 72px;
}

.marketing-eyebrow {
  margin: 0 0 16px;
  color: var(--marketing-coral);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.marketing-eyebrow.light {
  color: #a8e4d5;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--marketing-ink);
  font-size: clamp(46px, 5.2vw, 72px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.marketing-lead {
  max-width: 590px;
  margin: 26px 0 0;
  color: #4e615a;
  font-size: 20px;
  line-height: 1.55;
}

.marketing-hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
}

.marketing-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--marketing-green);
  font-size: 15px;
  font-weight: 750;
}

.marketing-proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: #4f625b;
  font-size: 13px;
}

.marketing-proof-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.marketing-proof-list li span:first-child {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--marketing-mint);
  color: var(--marketing-green);
  font-weight: 900;
}

.marketing-product-visual {
  position: relative;
  border: 1px solid rgba(16, 35, 30, 0.15);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(28, 52, 45, 0.18);
  transform: rotate(1deg);
}

.visual-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #e6ebe8;
  color: #52645e;
  font-size: 12px;
  font-weight: 750;
}

.visual-window-dots {
  display: flex;
  gap: 5px;
}

.visual-window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dfe6e2;
}

.visual-live {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  color: #2d6a58;
}

.visual-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ba876;
  box-shadow: 0 0 0 4px rgba(43, 168, 118, 0.12);
}

.visual-body {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 410px;
}

.visual-conversations {
  padding: 12px;
  border-right: 1px solid #e6ebe8;
  background: #fafbf9;
}

.visual-conversation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 10px;
  border-bottom: 1px solid #edf0ee;
}

.visual-conversation.active {
  border: 1px solid #cfe6dd;
  border-radius: 9px;
  background: #eef8f4;
}

.visual-conversation strong,
.visual-chat-head strong {
  display: block;
  color: #1f332c;
  font-size: 12px;
}

.visual-conversation small,
.visual-chat-head small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #73817c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #263d35;
  font-size: 10px;
  font-weight: 850;
}

.visual-avatar.coral { background: #ffd8cf; }
.visual-avatar.green { background: #caeddf; }
.visual-avatar.sand { background: #f0e2bd; }

.visual-unread {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--marketing-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.visual-time {
  color: #8b9793;
  font-size: 9px;
}

.visual-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 1px 1px, rgba(18, 60, 51, 0.06) 1px, transparent 0);
  background-size: 18px 18px;
}

.visual-chat-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6ebe8;
}

.visual-owner {
  align-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--marketing-mint);
  color: var(--marketing-green);
  font-size: 9px;
  font-weight: 800;
}

.visual-message {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 10px;
  color: #294038;
  font-size: 11px;
  line-height: 1.45;
}

.visual-message.incoming {
  align-self: flex-start;
  border: 1px solid #e2e7e4;
  background: #fff;
  border-bottom-left-radius: 3px;
}

.visual-message.outgoing {
  align-self: flex-end;
  background: #dff4ea;
  border-bottom-right-radius: 3px;
}

.visual-note {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-left: 3px solid #e6a43d;
  background: #fff8e8;
  color: #70562e;
  font-size: 10px;
}

.visual-composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid #dce4e0;
  border-radius: 8px;
  background: #fff;
  color: #8b9793;
  font-size: 10px;
}

.visual-composer b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--marketing-green);
  color: #fff;
}

.visual-floating-card {
  position: absolute;
  right: -30px;
  bottom: -30px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 196px;
  padding: 13px 16px;
  border: 1px solid #dce4e0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 60, 51, 0.16);
}

.visual-floating-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--marketing-mint);
  color: var(--marketing-green);
  font-weight: 900;
}

.visual-floating-card strong,
.visual-floating-card small {
  display: block;
}

.visual-floating-card strong { font-size: 13px; }
.visual-floating-card small { color: var(--marketing-muted); font-size: 10px; }

.marketing-outcome-strip {
  border-block: 1px solid var(--marketing-line);
  background: #fff;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.outcome-grid p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 28px 26px;
  border-right: 1px solid var(--marketing-line);
}

.outcome-grid p:first-child { border-left: 1px solid var(--marketing-line); }
.outcome-grid strong { color: var(--marketing-green); font-size: 17px; }
.outcome-grid span { color: var(--marketing-muted); font-size: 12px; }

.marketing-section {
  padding: 110px 0;
}

.section-heading h2,
.marketing-final-cta h2 {
  max-width: 760px;
  margin: 0;
  color: var(--marketing-ink);
  font-size: clamp(36px, 4.2vw, 58px);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.section-heading > p:not(.marketing-eyebrow),
.marketing-final-cta p:not(.marketing-eyebrow) {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--marketing-muted);
  font-size: 18px;
  line-height: 1.6;
}

.section-heading.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 80px;
}

.section-heading.split > p {
  margin-bottom: 4px;
}

.section-heading.centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.benefit-story {
  display: grid;
  grid-template-columns: 1.35fr 0.825fr 0.825fr;
  gap: 1px;
  margin-top: 64px;
  border: 1px solid var(--marketing-line);
  background: var(--marketing-line);
}

.benefit-story article {
  min-height: 300px;
  padding: 32px;
  background: #fff;
}

.benefit-story article:not(.benefit-lead) {
  display: flex;
  flex-direction: column;
}

.benefit-number {
  color: var(--marketing-coral);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.benefit-story h3 {
  margin: 56px 0 12px;
  color: var(--marketing-ink);
  font-size: 25px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.benefit-story p {
  margin: 0;
  color: var(--marketing-muted);
  line-height: 1.65;
}

.benefit-lead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 28px;
}

.benefit-lead h3 {
  max-width: 430px;
  margin-top: 0;
  font-size: 34px;
}

.benefit-signal {
  grid-column: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--marketing-line);
  color: var(--marketing-muted);
  font-size: 12px;
}

.benefit-signal strong {
  color: var(--marketing-green);
  font-size: 62px;
  line-height: 0.8;
}

.how-section {
  background: var(--marketing-green);
  color: #fff;
}

.how-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 110px;
}

.how-section .section-heading h2,
.how-section .section-heading > p {
  color: #fff;
}

.how-section .section-heading > p {
  color: rgba(255, 255, 255, 0.7);
}

.how-section .marketing-button {
  margin-top: 30px;
}

.how-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.how-steps li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.how-steps li > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #a8e4d5;
  font-weight: 800;
}

.how-steps strong {
  color: #fff;
  font-size: 21px;
}

.how-steps p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.features-section {
  background: var(--marketing-cream);
}

.marketing-feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 62px;
  border-top: 1px solid #d8ddd7;
  border-left: 1px solid #d8ddd7;
}

.marketing-feature-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  min-height: 190px;
  padding: 30px;
  border-right: 1px solid #d8ddd7;
  border-bottom: 1px solid #d8ddd7;
}

.marketing-feature-list article > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #fff;
  color: var(--marketing-green);
  font-weight: 800;
}

.marketing-feature-list h3 {
  margin: 4px 0 10px;
  font-size: 18px;
}

.marketing-feature-list p {
  margin: 0;
  color: var(--marketing-muted);
  font-size: 14px;
  line-height: 1.6;
}

.pricing-section {
  background: #fff;
}

.marketing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  align-items: stretch;
  gap: 18px;
  margin-top: 58px;
}

.trial-explainer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: 780px;
  margin: 34px auto 0;
  padding: 22px;
  border: 1px solid var(--marketing-line);
  border-radius: 20px;
  background: var(--marketing-paper);
}

.trial-explainer > div:first-child {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: var(--marketing-green);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.trial-explainer h3,
.trial-explainer p { margin: 0; }
.trial-explainer p { margin-top: 6px; color: var(--marketing-muted); }

.faq-section { background: var(--marketing-cream); }

.faq-layout {
  display: grid;
  grid-template-columns: minmax(230px, .75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 7vw, 90px);
  align-items: start;
}

.faq-list { display: grid; gap: 10px; }

.faq-list details {
  border: 1px solid var(--marketing-line);
  border-radius: 16px;
  background: var(--marketing-paper);
  transition: border-color .2s ease, transform .2s ease;
}

.faq-list details:hover,
.faq-list details[open] { border-color: var(--marketing-green); }
.faq-list details[open] { transform: translateY(-1px); }
.faq-list summary { padding: 18px 20px; cursor: pointer; font-weight: 760; }
.faq-list details p { margin: -4px 0 0; padding: 0 20px 20px; color: var(--marketing-muted); }

.motion-ready .reveal-on-scroll {
  transform: translateY(10px);
  transition: transform .55s cubic-bezier(.2, .75, .25, 1);
}

.motion-ready .reveal-on-scroll.is-visible { transform: none; }

.marketing-button,
.marketing-plan,
.marketing-feature-list article {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.marketing-button:hover { transform: translateY(-2px); }
.marketing-plan:hover,
.marketing-feature-list article:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(18, 60, 51, .1);
}

.marketing-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 540px;
  padding: 30px;
  border: 1px solid var(--marketing-line);
  background: var(--marketing-paper);
}

.marketing-plan.featured {
  border: 2px solid var(--marketing-green);
  box-shadow: 0 22px 52px rgba(18, 60, 51, 0.12);
  transform: translateY(-10px);
}

.plan-popular {
  position: absolute;
  top: -14px;
  left: 24px;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--marketing-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marketing-plan h3 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.plan-description {
  min-height: 48px;
  margin: 10px 0 0;
  color: var(--marketing-muted);
  font-size: 14px;
  line-height: 1.55;
}

.plan-trial-rule {
  margin: 0 0 16px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--marketing-mint);
  color: var(--marketing-green);
  font-size: 12px;
  font-weight: 780;
}

.plan-trial-rule.requires-card {
  background: #fff0eb;
  color: #9f321d;
}

.marketing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 28px;
}

.marketing-plan-price > span {
  color: var(--marketing-muted);
  font-size: 12px;
  font-weight: 800;
}

.marketing-plan-price strong {
  font-size: 44px;
  letter-spacing: -0.05em;
}

.marketing-plan-price small {
  color: var(--marketing-muted);
}

.plan-capacity {
  margin: 8px 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--marketing-line);
  color: var(--marketing-green);
  font-size: 13px;
  font-weight: 700;
}

.marketing-plan ul {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.marketing-plan li {
  display: flex;
  gap: 9px;
  color: #40544d;
  font-size: 14px;
}

.marketing-plan li > span:first-child {
  color: #25956c;
  font-weight: 900;
}

.marketing-plan .marketing-button {
  margin-top: auto;
}

.pricing-note {
  margin: 26px auto 0;
  color: var(--marketing-muted);
  font-size: 13px;
  text-align: center;
}

.marketing-final-cta {
  padding: 88px 0;
  background: var(--marketing-green);
  color: #fff;
}

.final-cta-layout {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 60px;
}

.marketing-final-cta h2,
.marketing-final-cta p:not(.marketing-eyebrow) {
  color: #fff;
}

.marketing-final-cta p:not(.marketing-eyebrow) {
  color: rgba(255, 255, 255, 0.7);
}

.marketing-footer {
  padding: 34px 0;
  background: #0c2923;
  color: rgba(255, 255, 255, 0.68);
}

.marketing-footer .marketing-container {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 30px;
}

.marketing-footer .marketing-brand {
  color: #fff;
}

.marketing-footer .marketing-brand-mark {
  background: #fff;
  color: var(--marketing-green);
}

.marketing-footer p {
  margin: 0;
  font-size: 12px;
}

.marketing-footer a:last-child {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.marketing-modal {
  z-index: 100;
}

.marketing-signup-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 16px auto;
  padding: 34px;
  border-radius: 14px;
  background: var(--marketing-paper);
  box-shadow: 0 30px 90px rgba(8, 28, 23, 0.3);
}

.marketing-signup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--marketing-line);
}

.marketing-signup-head h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.marketing-signup-head p:not(.marketing-eyebrow) {
  margin: 8px 0 0;
  color: var(--marketing-muted);
}

.marketing-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--marketing-line);
  border-radius: 50%;
  background: #fff;
  color: var(--marketing-ink);
  font-size: 24px;
  cursor: pointer;
}

.marketing-signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 26px;
}

.marketing-signup-grid label {
  display: grid;
  gap: 7px;
  color: #40544d;
  font-size: 12px;
  font-weight: 750;
}

.marketing-signup-grid .full-field {
  grid-column: 1 / -1;
}

.marketing-signup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
}

.marketing-signup-actions p {
  max-width: 390px;
  margin: 0;
  color: var(--marketing-muted);
  font-size: 11px;
}

@media (max-width: 1050px) {
  .marketing-nav {
    display: none;
  }

  .marketing-header {
    grid-template-columns: 1fr auto;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .marketing-product-visual {
    width: min(720px, 94%);
    margin-inline: auto;
  }

  .benefit-story {
    grid-template-columns: 1fr 1fr;
  }

  .benefit-lead {
    grid-column: 1 / -1;
  }

  .how-layout {
    gap: 60px;
  }

  .marketing-feature-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .marketing-container,
  .marketing-header {
    width: min(100% - 32px, 1180px);
  }

  .marketing-header {
    min-height: 70px;
  }

  .marketing-header-actions {
    gap: 8px;
  }

  .marketing-login,
  .marketing-header .marketing-button {
    display: none;
  }

  .marketing-hero {
    padding: 120px 0 70px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .marketing-lead {
    font-size: 18px;
  }

  .marketing-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-text-link {
    justify-content: center;
  }

  .marketing-proof-list {
    display: grid;
  }

  .marketing-product-visual {
    width: 100%;
    transform: none;
  }

  .visual-body {
    grid-template-columns: 1fr;
    min-height: 380px;
  }

  .visual-conversations {
    display: none;
  }

  .visual-floating-card {
    right: 12px;
    bottom: -34px;
  }

  .outcome-grid {
    grid-template-columns: 1fr 1fr;
  }

  .outcome-grid p:nth-child(3) {
    border-left: 1px solid var(--marketing-line);
  }

  .marketing-section {
    padding: 78px 0;
  }

  .section-heading.split,
  .how-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .benefit-story,
  .marketing-feature-list,
  .marketing-pricing-grid {
    grid-template-columns: 1fr;
  }

  .benefit-lead {
    grid-column: auto;
  }

  .benefit-story article {
    min-height: auto;
  }

  .benefit-lead {
    grid-template-columns: auto 1fr;
  }

  .benefit-signal {
    grid-column: 1 / -1;
  }

  .benefit-story article:not(.benefit-lead) h3 {
    margin-top: 32px;
  }

  .marketing-feature-list article {
    min-height: auto;
  }

  .marketing-plan.featured {
    transform: none;
  }

  .final-cta-layout,
  .marketing-footer .marketing-container,
  .marketing-signup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-footer .marketing-container {
    display: flex;
  }

  .marketing-signup-panel {
    padding: 24px 20px;
  }

  .marketing-signup-grid {
    grid-template-columns: 1fr;
  }

  .marketing-signup-grid .full-field {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .marketing-brand {
    font-size: 18px;
  }

  .marketing-brand-mark {
    width: 31px;
    height: 31px;
  }

  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .outcome-grid p,
  .outcome-grid p:nth-child(3) {
    border-left: 1px solid var(--marketing-line);
  }
}

@media (max-width: 720px) {
  .demo-selector {
    width: min(100% - 28px, 1080px);
    padding-bottom: 32px;
  }

  .demo-selector-header {
    min-height: 70px;
  }

  .demo-selector-actions {
    gap: 10px;
  }

  .demo-back-link {
    display: none;
  }

  .demo-selector-intro {
    padding: 42px 0 32px;
  }

  .demo-selector-intro h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .demo-selector-intro > p:not(.marketing-eyebrow) {
    font-size: 16px;
  }

  .demo-plan-grid {
    grid-template-columns: 1fr;
  }

  .demo-access-card {
    min-height: 112px;
  }

  .marketing-demo-nav {
    margin-top: 70px;
    padding: 0.65rem 1rem;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .marketing-demo-nav small {
    flex-basis: 100%;
  }

  .demo-login-notice dl > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .trial-explainer { align-items: start; grid-template-columns: 56px 1fr; padding: 18px; }
  .trial-explainer > div:first-child { width: 56px; height: 56px; border-radius: 16px; font-size: 23px; }
}

/* 2026 panel design system: one visual language across Operator, Tenant and Superadmin. */
.tenant-shell :is(h1, h2, h3, .panel-title),
.admin-shell :is(h1, h2, h3, .panel-title),
.operator-app :is(h1, h2, h3, .panel-title) {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

.nav-icon,
.premium-lock-icon,
.plan-lock .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.premium-lock-icon,
.feature-crown,
.composer-feature-crown {
  color: var(--premium);
}

.plan-lock {
  color: var(--premium);
  background: var(--premium-soft);
  border-color: color-mix(in srgb, var(--premium) 38%, transparent);
}

.feature-crown {
  width: 17px;
  height: 17px;
  padding: 2px;
  border-radius: 999px;
  background: var(--premium-soft);
}

.composer-feature-crown {
  width: 18px;
  height: 18px;
  padding: 3px;
}

.analysis-state,
.analysis-result {
  margin-bottom: .55rem;
}

.analysis-state {
  min-height: 62px;
  padding: .65rem;
  border: 1px solid var(--op-line);
  border-radius: 8px;
  background: var(--op-soft);
}

.analysis-state p {
  margin: 0 0 .5rem;
  color: var(--op-muted);
  font-size: .68rem;
  line-height: 1.45;
}

.analysis-locked {
  position: relative;
  overflow: hidden;
  opacity: 1 !important;
  background: linear-gradient(145deg, var(--premium-soft), var(--op-soft) 72%);
}

.analysis-preview {
  min-height: 34px;
  padding: .4rem .5rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  border-radius: 6px;
  color: var(--op-muted);
  background: color-mix(in srgb, var(--op-soft) 72%, transparent);
  filter: blur(1.7px);
  user-select: none;
}

.analysis-preview strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .67rem;
}

.analysis-cta {
  width: fit-content;
  margin-top: .55rem;
  display: inline-flex;
  align-items: center;
  color: var(--op-green);
  font-size: .68rem;
  font-weight: 800;
}

.analysis-cta::after {
  content: "›";
  margin-left: .28rem;
  font-size: 1rem;
  line-height: .7;
}

.analysis-progress {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--premium);
  font-size: .69rem;
  font-weight: 750;
}

.analysis-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid color-mix(in srgb, var(--premium) 28%, transparent);
  border-top-color: var(--premium);
  border-radius: 50%;
  animation: analysis-spin .8s linear infinite;
}

.analysis-help {
  opacity: .82;
}

@keyframes analysis-spin {
  to { transform: rotate(360deg); }
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.plan-card-admin {
  display: flex;
  flex-direction: column;
}

.plan-card-admin .plan-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-shell .plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.admin-shell .plan-card-admin {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.admin-shell .plan-feature-groups {
  display: grid;
  gap: 12px;
  margin: 4px 0 16px;
}

.admin-shell .plan-feature-group {
  display: grid;
  gap: 7px;
}

.admin-shell .plan-feature-category {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-shell .plan-rule {
  justify-content: flex-start;
  padding: 0;
  border: 0;
}

.admin-shell .plan-rule .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.admin-shell .plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-shell .table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.admin-shell .tenant-table {
  width: 100%;
  min-width: 720px;
}

.tenant-shell .empty-table-state,
.admin-shell .empty-table-state {
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1024px) {
  .plan-grid,
  .admin-shell .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-spinner {
    animation-duration: 1.8s;
  }
}
