:root {
  --paper: #f6f8fa;
  --paper-strong: #ffffff;
  --ink: #1b2228;
  --muted: #67707a;
  --line: rgba(156, 167, 178, 0.28);
  --accent: #8558b3;
  --accent-dark: #6f489a;
  --accent-soft: rgba(133, 88, 179, 0.12);
  --accent-border: rgba(133, 88, 179, 0.26);
  --accent-contrast: #ffffff;
  --warn: #9a6b2f;
  --danger: #a24f54;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --shadow: 0 24px 58px -44px rgba(26, 35, 42, 0.28);
  --panel-shadow: 0 16px 36px -28px rgba(26, 35, 42, 0.18);
  --workspace-radius: 10px;
  --telephony-icon-wahlwiederholung: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTI4IiB6b29tQW5kUGFuPSJtYWduaWZ5IiB2aWV3Qm94PSIwIDAgOTYgOTUuOTk5OTk5IiBoZWlnaHQ9IjEyOCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmVyc2lvbj0iMS4wIj48ZGVmcz48Y2xpcFBhdGggaWQ9IjM0OTFiNWE0MDMiPjxwYXRoIGQ9Ik0gMzguMzk4NDM4IDIwLjk2ODc1IEwgOTIuNDY0ODQ0IDIwLjk2ODc1IEwgOTIuNDY0ODQ0IDc1LjAzMTI1IEwgMzguMzk4NDM4IDc1LjAzMTI1IFogTSAzOC4zOTg0MzggMjAuOTY4NzUgIiBjbGlwLXJ1bGU9Im5vbnplcm8iLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iY2RiZGYyMzlmNSI+PHBhdGggZD0iTSA2NS40Mjk2ODggMjAuOTY4NzUgQyA1MC41IDIwLjk2ODc1IDM4LjM5ODQzOCAzMy4wNzAzMTIgMzguMzk4NDM4IDQ4IEMgMzguMzk4ND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MIDE0LjY1MjM0NCA0My42NTYyNSBDIDE0LjY1MjM0NCA0My44MzU5MzggMTQuNTU4NTk0IDQ0IDE0LjQwMjM0NCA0NC4wODk4NDQgQyAxNC4zMjQyMTkgNDQuMTMyODEyIDE0LjIzODI4MSA0NC4xNTYyNSAxNC4xNTIzNDQgNDQuMTU2MjUgWiBNIDE0LjE1MjM0NCA0NC4xNTYyNSAiIGZpbGwtb3BhY2l0eT0iMSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvZz48L2c+PC9zdmc+");
  --role-mfa: #8558b3;
  --role-mfa-dark: #6f489a;
  --role-mfa-soft: rgba(133, 88, 179, 0.12);
  --role-mfa-border: rgba(133, 88, 179, 0.26);
  --role-doctor: #0789c8;
  --role-doctor-dark: #066b9c;
  --role-doctor-soft: rgba(7, 137, 200, 0.12);
  --role-doctor-border: rgba(7, 137, 200, 0.26);
  --role-admin: #8558b3;
  --role-admin-dark: #6f489a;
  --role-admin-soft: rgba(133, 88, 179, 0.12);
  --role-admin-border: rgba(133, 88, 179, 0.26);
  --role-system: #7b8794;
  --role-system-dark: #68717b;
  --role-system-soft: rgba(123, 135, 148, 0.12);
  --role-system-border: rgba(123, 135, 148, 0.26);
}

.shell[data-ui-role="mfa"] {
  --accent: var(--role-mfa);
  --accent-dark: var(--role-mfa-dark);
  --accent-soft: var(--role-mfa-soft);
  --accent-border: var(--role-mfa-border);
}

.shell[data-ui-role="doctor"] {
  --accent: var(--role-doctor);
  --accent-dark: var(--role-doctor-dark);
  --accent-soft: var(--role-doctor-soft);
  --accent-border: var(--role-doctor-border);
}

.shell[data-ui-role="admin"] {
  --accent: var(--role-admin);
  --accent-dark: var(--role-admin-dark);
  --accent-soft: var(--role-admin-soft);
  --accent-border: var(--role-admin-border);
}

.shell[data-ui-role="system"] {
  --accent: var(--role-system);
  --accent-dark: var(--role-system-dark);
  --accent-soft: var(--role-system-soft);
  --accent-border: var(--role-system-border);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 14% 8%, rgba(123, 135, 148, 0.08), transparent 30rem),
    radial-gradient(circle at 86% 10%, rgba(95, 118, 146, 0.08), transparent 26rem),
    linear-gradient(135deg, #fbfcfd 0%, var(--paper) 58%, #eef2f6 100%);
  color: var(--ink);
  font-family: "Satoshi", "Geist", "Aptos", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(153, 163, 174, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153, 163, 174, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}

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

code {
  padding: 0.16rem 0.38rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent-dark);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.82em;
}

.shell {
  --workspace-sidebar-left-width: clamp(220px, 19vw, 280px);
  --workspace-sidebar-right-width: clamp(420px, 29vw, 560px);
  --workspace-side-grip-width: 44px;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0 clamp(14px, 1.8vw, 28px) 24px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow-x: clip;
}

.app-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.shell[data-workspace-features-ready="false"] .workspace-nav,
.shell[data-workspace-features-ready="false"] .metrics-strip,
.shell[data-workspace-features-ready="false"] .workspace-layout {
  opacity: 0;
  pointer-events: none;
}

.poks-shell-chrome {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--workspace-radius) var(--workspace-radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(123, 135, 148, 0.07), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.76));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(1.08);
}

.poks-topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 248, 250, 0.72));
  border-bottom: 1px solid rgba(156, 167, 178, 0.2);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.topbar-left,
.topbar-center,
.topbar-right {
  position: relative;
  z-index: 1;
}

.topbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.topbar-date {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-separator {
  color: var(--muted);
}

.topbar-clock {
  min-width: 86px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(156, 167, 178, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 800;
}

.topbar-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.topbar-area {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.topbar-icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: var(--panel-shadow);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.topbar-icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--accent-border);
  color: var(--accent-dark);
}

.profile-avatar {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.topbar-auth-glyph {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 15px;
  height: 15px;
  color: currentColor;
}

.topbar-auth-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2.1px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  box-sizing: border-box;
}

.topbar-auth-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2.1px;
  height: 7.5px;
  transform: translateX(-50%);
  background: currentColor;
  border-radius: 999px;
}

.topbar-auth-glyph[data-pending="true"] {
  opacity: 0.7;
}

.topbar-metrics-glyph {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 4px);
  align-items: center;
  gap: 2px;
  width: 18px;
  height: 15px;
}

.topbar-metrics-glyph::before,
.topbar-metrics-glyph::after,
.topbar-metrics-glyph span {
  content: "";
  display: block;
  width: 4px;
  border-radius: 999px;
  background: currentColor;
}

.topbar-metrics-glyph::before {
  height: 8px;
}

.topbar-metrics-glyph::after {
  height: 12px;
}

.topbar-metrics-glyph span {
  height: 15px;
}

.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph {
  align-items: center;
}

.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph::before,
.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph::after,
.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph span {
  height: 3px;
}

.workspace-nav {
  --workspace-nav-item-height: 46px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  position: sticky;
  top: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--workspace-radius);
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.04);
  z-index: 18;
}

.workspace-nav.is-dragging {
  cursor: grabbing;
}

.workspace-nav a,
.sidebar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-weight: 680;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
}

.workspace-nav a {
  position: relative;
  box-sizing: border-box;
  flex: 0 1 clamp(9.75rem, 7.8vw, 11.75rem);
  min-width: clamp(9.75rem, 7.8vw, 11.75rem);
  min-height: var(--workspace-nav-item-height);
  height: var(--workspace-nav-item-height);
  border: 1px solid transparent;
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.56);
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  white-space: normal;
  gap: 0.45rem;
}

.workspace-fa-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.workspace-nav__icon {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  opacity: 0.78;
}

.workspace-nav__icon .workspace-fa-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.workspace-nav a.is-active .workspace-nav__icon,
.workspace-nav a[aria-current="page"] .workspace-nav__icon {
  opacity: 0.96;
}

.workspace-nav a > span:last-child {
  min-width: 0;
}

.workspace-nav[hidden],
.workspace-nav a[hidden],
body[data-ui-surface="mobile"] .workspace-nav[hidden],
body[data-ui-surface="mobile"] .workspace-nav a[hidden],
body[data-ui-surface="desktop"] .workspace-nav[hidden],
body[data-ui-surface="desktop"] .workspace-nav a[hidden] {
  display: none !important;
}

.workspace-nav a.has-nav-badge {
  padding-right: 2.25rem;
}

.workspace-nav__badge {
  position: absolute;
  top: -7px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: #b5281f;
  color: #ffffff;
  box-shadow: 0 14px 26px -18px rgba(31, 37, 35, 0.72);
  font-size: 0.7rem;
  font-weight: 860;
  line-height: 1;
  letter-spacing: -0.02em;
  pointer-events: none;
}

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

.workspace-nav a[data-workspace-feature="documents"] {
  flex: 0 1 clamp(14.5rem, 12vw, 18rem);
  min-width: clamp(14.5rem, 12vw, 18rem);
}

.workspace-nav a[draggable="true"] {
  cursor: grab;
  user-select: none;
  padding-left: 1.75rem;
}

.workspace-nav a[draggable="true"]::before {
  content: "";
  position: absolute;
  left: 0.58rem;
  top: 50%;
  width: 10px;
  height: 18px;
  border-radius: 999px;
  background-image: radial-gradient(circle, currentColor 1.15px, transparent 1.45px);
  background-size: 5px 5px;
  background-position: 0 0;
  opacity: 0.42;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-nav a[draggable="true"]:hover::before,
.workspace-nav a[draggable="true"]:focus-visible::before,
.workspace-nav a[draggable="true"].is-dragging::before,
.workspace-nav a[draggable="true"][aria-grabbed="true"]::before {
  opacity: 0.82;
  transform: translateY(-50%) scale(1.05);
}

.workspace-nav a:hover,
.sidebar-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--accent-border);
}

.workspace-nav a.is-active,
.workspace-nav a[aria-current="page"],
.sidebar-nav a.is-active,
.sidebar-nav a[aria-current="page"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--accent-contrast);
  border-color: var(--accent-dark);
  box-shadow: 0 12px 22px -18px color-mix(in srgb, var(--accent-dark) 84%, black);
}

.workspace-nav a.is-dragging {
  opacity: 0.72;
  cursor: grabbing;
}

.workspace-nav a.is-drop-target {
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 2px var(--accent-soft), 0 12px 22px -18px color-mix(in srgb, var(--accent-dark) 84%, black);
}

.workspace-layout {
  display: grid;
  grid-template-columns:
    var(--workspace-sidebar-left-width)
    minmax(0, 1fr)
    var(--workspace-sidebar-right-width);
  gap: 18px;
  align-items: stretch;
  align-self: stretch;
  min-height: 0;
  height: auto;
  overflow: hidden;
  transition: grid-template-columns 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-main {
  display: grid;
  align-content: start;
  gap: 18px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-top: 14px;
  padding-right: 4px;
}

.shell > .poks-service-footer {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 24px;
  margin-bottom: 10px;
}

.poks-service-footer {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
}

.poks-service-footer__copy,
.poks-service-footer__text,
.poks-service-footer__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.poks-service-footer__copy {
  flex: 1 1 auto;
  overflow: hidden;
}

.poks-service-footer__text {
  flex: 1 1 auto;
  margin: 0;
  font-style: normal;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poks-service-footer__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.poks-service-footer__text span,
.poks-service-footer__link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.poks-service-footer__link {
  color: var(--accent-dark);
  font-weight: 820;
  text-decoration: none;
}

.poks-service-footer__link:hover,
.poks-service-footer__link:focus-visible {
  text-decoration: underline;
}

.poks-service-footer__link--manual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  text-decoration: none;
}

.metrics-strip {
  display: none;
}

.workspace-sidebar,
.workspace-rail {
  display: grid;
  gap: 14px;
  align-self: start;
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.workspace-sidebar {
  position: static;
  padding-top: 14px;
}

.workspace-rail {
  position: static;
  padding-top: 14px;
}

.workspace-side-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 250, 253, 0.64));
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 14px 26px -24px rgba(31, 37, 35, 0.4);
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.workspace-side-toggle[data-unread-count]::after {
  content: attr(data-unread-count);
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #b5281f;
  color: #fff;
  box-shadow: 0 12px 24px -18px rgba(31, 37, 35, 0.7);
  font-size: 0.68rem;
  font-weight: 860;
  line-height: 1;
}

.workspace-side-toggle:hover,
.workspace-focus-toggle:hover {
  border-color: rgba(123, 135, 148, 0.34);
  background: rgba(245, 247, 249, 0.86);
}

.workspace-side-toggle:active,
.workspace-focus-toggle:active {
  transform: translateY(1px) scale(0.99);
}

.workspace-side-toggle [data-sidebar-toggle-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-focus-controls {
  position: sticky;
  top: 0;
  z-index: 14;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  padding: 0 4px 8px;
  pointer-events: none;
}

.workspace-focus-toggle {
  min-height: 34px;
  padding: 0.5rem 0.82rem;
  border-color: rgba(156, 167, 178, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 253, 0.68));
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 14px 26px -24px rgba(31, 37, 35, 0.42);
  font-size: 0.78rem;
  pointer-events: auto;
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] {
  --workspace-sidebar-left-width: var(--workspace-side-grip-width);
}

body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] {
  --workspace-sidebar-right-width: var(--workspace-side-grip-width);
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] .workspace-sidebar,
body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] .workspace-rail {
  overflow: visible;
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] .workspace-sidebar .sidebar-section,
body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] .workspace-rail .panel--chat {
  display: none;
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] .workspace-side-toggle--left,
body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] .workspace-side-toggle--right {
  min-height: min(280px, 44dvh);
  width: var(--workspace-side-grip-width);
  padding: 12px 4px;
  border-radius: var(--workspace-radius);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.sidebar-section {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.12);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.workspace-rail .panel--chat {
  display: grid;
  gap: 12px;
  min-height: 280px;
}

.chat-stage {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-height: 180px;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.12);
  border-radius: var(--workspace-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(247, 250, 253, 0.52)),
    rgba(255, 255, 255, 0.5);
}

.chat-stage strong {
  letter-spacing: -0.03em;
  font-size: 1.02rem;
}

.chat-stage span {
  color: var(--muted);
  line-height: 1.5;
}

.internal-chat {
  min-width: 0;
}

.internal-chat__status,
.internal-chat__token-form,
.internal-chat__token-compact,
.internal-chat__message-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.internal-chat__token-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(36, 100, 74, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(226, 244, 236, 0.66);
}

.internal-chat__token-compact[hidden],
.internal-chat__token-form[hidden] {
  display: none;
}

.internal-chat__token-form .field,
.internal-chat__message-form .field {
  min-width: 0;
}

.internal-chat__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.internal-chat__modebar {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.internal-chat__done-notes-toggle {
  justify-self: start;
}

.internal-chat__target-field {
  margin: 0;
}

.internal-chat__target-field span {
  font-size: 0.68rem;
}

.internal-chat__filters .mini-button {
  position: relative;
}

.internal-chat__filters .mini-button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: rgba(31, 37, 35, 0.82);
}

.internal-chat__filter-badge {
  position: absolute;
  top: -8px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: #b5281f;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 12px 22px -16px rgba(31, 37, 35, 0.82);
  font-size: 0.68rem;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.32);
}

.internal-chat__filter-badge[hidden] {
  display: none;
}

.internal-chat__filter-badge--notes {
  right: -8px;
}

.internal-chat__feed {
  display: grid;
  gap: 10px;
  min-height: 160px;
  max-height: min(46dvh, 520px);
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.internal-chat__conversation {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(150, 160, 170, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.internal-chat__conversation:hover,
.internal-chat__conversation:focus-visible,
.internal-chat__conversation.is-active {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.internal-chat__conversation--unread {
  border-color: rgba(181, 40, 31, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 250, 249, 0.92), rgba(255, 255, 255, 0.78));
}

.internal-chat__conversation-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(145deg, var(--role-primary-soft), rgba(255, 255, 255, 0.66));
  color: var(--role-primary-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.internal-chat__conversation-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.internal-chat__conversation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
}

.internal-chat__conversation-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-chat__conversation-head time {
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.internal-chat__conversation-subtitle {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-chat__conversation p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.79rem;
  line-height: 1.34;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.internal-chat__conversation-tools {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 6px;
  min-width: 24px;
}

.internal-chat__conversation-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #b5281f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.internal-chat__message {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px -28px rgba(31, 37, 35, 0.28);
}

.internal-chat__message--unread {
  border-color: rgba(181, 40, 31, 0.28);
  background: linear-gradient(135deg, rgba(255, 250, 249, 0.86), rgba(255, 255, 255, 0.74));
}

.internal-chat__message-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 6px;
  color: var(--muted);
  font-size: clamp(0.67rem, 0.74rem, 0.82rem);
  line-height: 1.28;
}

.internal-chat__message-sender {
  --internal-chat-sender-color: var(--accent-dark);
  min-width: 0;
  max-height: 2.56em;
  color: var(--internal-chat-sender-color);
  font-weight: 700;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.internal-chat__message-head time {
  white-space: nowrap;
}

.internal-chat__message-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
}

.internal-chat__message-expand,
.internal-chat__message-done {
  display: inline-grid;
  width: 1.42em;
  height: 1.42em;
  min-width: 1.42em;
  padding: 0.12em;
  place-items: center;
  border: 0;
  border-radius: 0.45em;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.internal-chat__conversation-open {
  color: var(--muted);
}

.internal-chat__message-expand:hover,
.internal-chat__message-expand:focus-visible {
  background: rgba(31, 37, 41, 0.08);
  color: var(--ink);
  outline: none;
}

.internal-chat__message-done {
  color: #72a92d;
}

.internal-chat__message-done:hover,
.internal-chat__message-done:focus-visible {
  background: rgba(114, 169, 45, 0.12);
  outline: none;
}

.internal-chat__message-done:disabled,
.internal-chat__done-button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.internal-chat__message-expand svg,
.internal-chat__message-done svg,
.internal-chat__done-button svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.internal-chat__message-done svg circle,
.internal-chat__done-button svg circle {
  stroke-width: 1.9;
}

.internal-chat__done-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(114, 169, 45, 0.32);
  background: rgba(232, 246, 218, 0.72);
  color: #436d18;
  font-weight: 760;
}

.internal-chat__done-button:hover,
.internal-chat__done-button:focus-visible {
  border-color: rgba(114, 169, 45, 0.5);
  background: rgba(219, 241, 196, 0.92);
  outline: none;
}

.internal-chat__message-body {
  color: var(--ink);
  overflow-wrap: anywhere;
  line-height: 1.42;
}

.internal-chat__message-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.internal-chat__message--done {
  opacity: 0.64;
}

.internal-chat__message--done .internal-chat__message-body {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.internal-chat-modal[hidden] {
  display: none;
}

.internal-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.internal-chat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.42);
  backdrop-filter: blur(4px);
}

.internal-chat-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  width: min(640px, calc(100vw - 32px));
  height: auto;
  min-width: min(360px, calc(100vw - 32px));
  min-height: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 32px);
  padding: 18px 18px 20px;
  overflow: auto;
  resize: both;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.45);
}

.internal-chat-modal__card::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.72;
  background:
    linear-gradient(135deg, transparent 52%, rgba(103, 112, 122, 0.52) 53%, rgba(103, 112, 122, 0.52) 57%, transparent 58%),
    linear-gradient(135deg, transparent 68%, rgba(103, 112, 122, 0.42) 69%, rgba(103, 112, 122, 0.42) 73%, transparent 74%);
}

.internal-chat-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.internal-chat-modal__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.internal-chat-modal__header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.internal-chat-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.internal-chat-modal__body {
  min-height: 92px;
  max-height: min(34dvh, 320px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.72);
  color: var(--ink);
  line-height: 1.5;
  white-space: normal;
}

.internal-chat-modal__body p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.internal-chat-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.internal-chat-modal__reply {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.internal-chat-modal__reply[hidden] {
  display: none;
}

.internal-chat-modal__templates {
  flex: 1 0 100%;
  padding: 10px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.62);
}

.internal-chat-modal__templates[hidden] {
  display: none;
}

.internal-chat-modal__templates summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.internal-chat-modal__template-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-top: 10px;
}

.internal-chat-modal__template-grid textarea {
  min-height: 64px;
}

.internal-chat-modal__template-preview {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(108, 76, 145, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(108, 76, 145, 0.08);
  color: var(--ink);
}

.internal-chat-modal__template-preview[hidden] {
  display: none;
}

.internal-chat-modal__template-preview strong {
  font-size: 0.78rem;
}

.internal-chat-modal__template-preview span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.internal-chat-modal__template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.internal-chat-modal__reply textarea {
  min-height: 72px;
  resize: vertical;
}

.internal-chat-modal__reply .field {
  flex: 1 0 100%;
}

.internal-chat-modal__reply .button {
  width: auto;
  min-width: 172px;
  padding-inline: 22px;
}

.document-rejection-modal[hidden] {
  display: none;
}

.document-rejection-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: grid;
  place-items: center;
  padding: 18px;
}

.document-rejection-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.44);
  backdrop-filter: blur(4px);
}

.document-rejection-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.45);
}

.document-rejection-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.document-rejection-modal__header h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.document-rejection-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.document-rejection-modal__form {
  display: grid;
  gap: 12px;
}

.document-rejection-modal__form textarea {
  min-height: 96px;
  resize: vertical;
}

.document-rejection-modal__field-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.document-rejection-modal__field-head output {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.document-rejection-modal__channel-status {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.document-rejection-modal__channel-status.is-warning {
  color: var(--danger);
  font-weight: 700;
}

.document-rejection-modal__preview,
.document-rejection-modal__sms {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.72);
}

.document-rejection-modal__preview-head,
.document-rejection-modal__sms-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.document-rejection-modal__preview p,
.document-rejection-modal__sms p {
  margin: 0;
  color: var(--ink);
  line-height: 1.32;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.document-rejection-modal__preview p.is-invalid,
.document-rejection-modal__preview output.is-invalid,
.document-rejection-modal__sms p.is-invalid,
.document-rejection-modal__sms output.is-invalid {
  color: var(--danger);
}

.document-rejection-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.contact-editor-modal[hidden] {
  display: none;
}

.contact-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 1003;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contact-editor-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.48);
  backdrop-filter: blur(4px);
}

.contact-editor-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px 18px 14px;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.45);
}

.contact-editor-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.contact-editor-modal__header h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}

.contact-editor-modal__header span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.contact-editor-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.contact-editor-modal__form {
  display: grid;
  gap: 10px;
}

.contact-dialer-modal[hidden] {
  display: none;
}

.contact-dialer-modal {
  position: fixed;
  inset: 0;
  z-index: 1004;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contact-dialer-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 46% 38%, rgba(255, 255, 255, 0.18), transparent 21rem),
    rgba(23, 30, 38, 0.48);
  backdrop-filter: blur(8px) saturate(0.92);
}

.contact-dialer-modal__card {
  position: relative;
  z-index: 1;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(156, 167, 178, 0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -4%, var(--accent-soft), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 251, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 32px 82px -42px rgba(16, 24, 32, 0.54);
}

.contact-dialer-modal__header {
  position: relative;
  display: block;
  padding: 22px 58px 16px;
  border-bottom: 1px solid rgba(156, 167, 178, 0.2);
  text-align: center;
}

.contact-dialer-modal__header h3 {
  margin: 0;
  color: #17202a;
  font-size: clamp(1.24rem, 2vw, 1.55rem);
  font-weight: 860;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.contact-dialer-modal__header span {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-dialer-modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(156, 167, 178, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.contact-dialer-modal__close:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.98);
}

.contact-dialer-modal__close:active {
  transform: translateY(0);
}

.contact-dialer-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  justify-items: center;
  padding: 22px 24px 24px;
}

.contact-dialer-target {
  position: relative;
  overflow: hidden;
  display: grid;
  width: min(390px, 100%);
  gap: 10px;
  justify-items: center;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98), transparent 11rem),
    linear-gradient(180deg, rgba(248, 251, 253, 0.96), rgba(236, 242, 247, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 18px 46px -34px rgba(26, 35, 42, 0.42);
}

.contact-dialer-target::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  pointer-events: none;
}

.contact-dialer-target__label {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-dialer-target__display {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(34, 125, 85, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(231, 242, 234, 0.88));
  color: #1d5138;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.contact-dialer-modal__form {
  display: grid;
  width: min(390px, 100%);
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 0;
}

.contact-dialer-modal__status {
  padding: 11px 13px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: 16px;
  background: rgba(247, 250, 253, 0.9);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.contact-dialer-modal__form .field {
  gap: 8px;
}

.contact-dialer-modal__form .field > span {
  color: #53606a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.contact-dialer-modal__form select {
  width: 100%;
  min-height: 52px;
  border-color: rgba(156, 167, 178, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c252d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.contact-dialer-modal__status--error {
  border-color: rgba(162, 79, 84, 0.28);
  background: rgba(162, 79, 84, 0.09);
  color: var(--danger);
}

.contact-dialer-modal__status--warn {
  border-color: rgba(154, 107, 47, 0.3);
  background: rgba(154, 107, 47, 0.09);
  color: var(--warn);
}

.contact-dialer-modal__status--success {
  border-color: rgba(34, 125, 85, 0.28);
  background: rgba(34, 125, 85, 0.09);
  color: #1b6848;
}

.contact-dialer-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 2px;
}

.contact-dialer-modal__actions .button {
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  padding-inline: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.contact-dialer-modal__actions .button--line {
  background: rgba(255, 255, 255, 0.72);
}

.contact-dialer-modal__actions .button--success {
  min-width: 148px;
  background: linear-gradient(135deg, #2f9a6c, #197449);
  box-shadow: 0 16px 30px -22px rgba(25, 116, 73, 0.86);
}

.contact-dialer-modal__actions .button:hover {
  transform: translateY(-1px);
}

.contact-dialer-modal__actions .button:active {
  transform: translateY(0);
}

.contact-editor-modal__sections {
  display: grid;
  gap: 10px;
}

.contact-editor-modal__section {
  min-width: 0;
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.92), rgba(255, 255, 255, 0.96));
}

.contact-editor-modal__section legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-editor-modal__section--safety {
  display: grid;
  gap: 10px;
  border-color: rgba(205, 142, 67, 0.26);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.9), rgba(255, 255, 255, 0.94));
}

.contact-editor-modal__grid {
  display: grid;
  gap: 9px 10px;
}

.contact-editor-modal__grid--identity {
  grid-template-columns: minmax(190px, 1.1fr) minmax(86px, 0.32fr) repeat(2, minmax(150px, 1fr));
  align-items: center;
}

.contact-editor-modal__grid--contact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-editor-modal__field--wide {
  grid-column: span 2;
}

.contact-editor-modal__field--company {
  grid-column: 1 / -1;
}

.contact-editor-modal__field--full {
  grid-column: 1 / -1;
}

.contact-editor-modal__field--color input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 5px;
  border-radius: 10px;
  cursor: pointer;
}

.contact-editor-modal__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}


.contact-editor-modal__columns--single {
  grid-template-columns: 1fr;
}

.contact-editor-modal__group[hidden] {
  display: none;
}

.contact-editor-modal__tool-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.contact-editor-modal__search-icon {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(106, 73, 151, 0.72);
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
}

.contact-editor-modal__search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 999px;
  background: rgba(106, 73, 151, 0.72);
  transform: rotate(45deg);
}
.contact-editor-modal__group {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 0;
}

.contact-editor-modal__group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.contact-editor-modal__status {
  padding: 8px 10px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.76);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.42;
}

.contact-editor-modal__status--error {
  border-color: rgba(162, 79, 84, 0.28);
  background: rgba(162, 79, 84, 0.1);
  color: var(--danger);
}

.contact-editor-modal__status--success {
  border-color: rgba(111, 193, 69, 0.32);
  background: rgba(111, 193, 69, 0.12);
  color: #426f2d;
}

.contact-editor-modal__status--warn {
  border-color: rgba(205, 142, 67, 0.34);
  background: rgba(205, 142, 67, 0.12);
  color: #855a22;
}

.contact-editor-modal__tool {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.62);
}

.contact-editor-modal__tool strong,
.contact-editor-modal__tool span {
  display: block;
}

.contact-editor-modal__tool strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-editor-modal__tool span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-editor-modal__tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.contact-editor-modal__results {
  display: grid;
  gap: 7px;
}

.contact-editor-modal__results[hidden] {
  display: none;
}

.contact-editor-modal__result,
.contact-editor-modal__match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contact-editor-modal__result {
  justify-content: space-between;
  padding: 8px 9px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.76);
}

.contact-editor-modal__result strong,
.contact-editor-modal__result span {
  display: block;
}

.contact-editor-modal__result span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-editor-modal__matches {
  display: grid;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(205, 142, 67, 0.28);
  border-radius: var(--workspace-radius);
  background: rgba(205, 142, 67, 0.08);
}

.contact-editor-modal__matches[hidden] {
  display: none;
}

.contact-editor-modal__matches > strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-editor-modal__matches > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.contact-editor-modal__match-list {
  display: grid;
  gap: 8px;
}

.contact-editor-modal__match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.72);
}

.contact-editor-modal__match strong,
.contact-editor-modal__match span {
  display: block;
}

.contact-editor-modal__match span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-editor-modal__merge {
  display: grid;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(137, 94, 180, 0.28);
  border-radius: var(--workspace-radius);
  background: rgba(137, 94, 180, 0.08);
}

.contact-editor-modal__merge[hidden] {
  display: none;
}

.contact-editor-modal__merge > strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-editor-modal__merge > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.contact-editor-modal__merge-warning {
  color: #855a22 !important;
}

.contact-editor-modal__merge-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contact-editor-modal__merge-table label {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.78);
}

.contact-editor-modal__merge-table span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-editor-modal__merge-table small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.contact-editor-modal__merge-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.contact-editor-modal__check,
.contact-editor-modal__confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.36;
}

.contact-editor-modal__check {
  padding: 8px 10px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: calc(var(--workspace-radius) - 2px);
  background: rgba(255, 255, 255, 0.68);
}

.contact-editor-modal__check span {
  display: grid;
  gap: 2px;
}

.contact-editor-modal__check strong {
  font-size: 0.9rem;
}

.contact-editor-modal__check small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
}

.contact-editor-modal__confirm {
  padding: 8px 10px;
  border: 1px solid rgba(162, 79, 84, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(162, 79, 84, 0.08);
}

.contact-editor-modal__confirm[hidden] {
  display: none;
}

.contact-editor-modal__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.contact-editor-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
  border-top: 1px solid rgba(156, 167, 178, 0.14);
}

.contact-editor-modal__spacer {
  flex: 1 1 auto;
}

.internal-chat[data-chat-ready="false"] .internal-chat__message-form,
.internal-chat[data-chat-ready="false"] .internal-chat__feed {
  opacity: 0.72;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 28px;
  min-height: min(560px, 64dvh);
  align-items: start;
  padding: 28px 0 22px;
}

.hero__copy {
  display: grid;
  gap: 12px;
  max-width: 860px;
  animation: rise 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-dark);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(3rem, 6.8vw, 6.4rem);
  font-weight: 760;
}

h2 {
  text-wrap: balance;
  font-size: clamp(1.45rem, 1.95vw, 2.15rem);
  font-weight: 720;
}

.hero__text {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.65;
}

.command-panel,
.panel,
.metrics-strip article {
  border: 1px solid rgba(156, 167, 178, 0.14);
  background: var(--surface);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(1.04);
}

.metrics-strip article {
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px -26px rgba(31, 37, 35, 0.3);
}

.command-panel {
  display: grid;
  gap: 18px;
  align-self: stretch;
  min-height: 340px;
  padding: 24px;
  border-radius: var(--workspace-radius);
  position: relative;
  overflow: hidden;
  animation: rise 0.7s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.command-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 78%, transparent 100%);
}

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

.status-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.pulse {
  width: 0.76rem;
  height: 0.76rem;
  border-radius: 999px;
  background: var(--accent);
  animation: breathe 1.8s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

.hint {
  margin: auto 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  padding: 0.74rem 0.86rem;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

input,
select {
  min-height: 42px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0.76rem 1rem;
  cursor: pointer;
  font-weight: 780;
  letter-spacing: -0.01em;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button--dark {
  background: var(--accent);
  color: var(--accent-contrast);
}

.button--dark:hover {
  background: var(--accent-dark);
}

.button--line {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
}

.button--line:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.button--danger {
  background: rgba(162, 79, 84, 0.12);
  color: var(--danger);
}

.button--danger:hover {
  background: rgba(162, 79, 84, 0.2);
}

.button--success {
  background: #227d55;
  color: #fff;
}

.button--success:hover {
  background: #196544;
}

.metrics-strip {
  position: static;
  display: grid;
  grid-template-columns: repeat(var(--metric-count, 8), minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin: 12px 0 12px;
  padding: 0 2px 2px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

.metrics-strip[hidden],
.shell[data-metrics-strip="collapsed"] .metrics-strip {
  display: none;
}

.metrics-strip article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem;
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px 9px;
  border-radius: var(--workspace-radius);
  position: relative;
  overflow: hidden;
  animation: rise 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 1) * 60ms);
}

.metrics-strip__icon {
  grid-row: 1 / 3;
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 1.68rem;
  height: 1.68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: color-mix(in srgb, var(--accent-dark) 72%, var(--muted));
  border: 1px solid rgba(156, 167, 178, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.metrics-strip__icon .workspace-fa-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.metrics-strip article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(156, 167, 178, 0.42) 0%, rgba(156, 167, 178, 0.12) 72%, transparent 100%);
}

.metrics-strip article:nth-child(1) {
  --i: 1;
}

.metrics-strip article:nth-child(2) {
  --i: 2;
}

.metrics-strip article:nth-child(3) {
  --i: 3;
}

.metrics-strip article:nth-child(4) {
  --i: 4;
}

.metrics-strip article:nth-child(5) {
  --i: 5;
}

.metrics-strip article:nth-child(6) {
  --i: 6;
}

.metrics-strip article:nth-child(7) {
  --i: 7;
}

.metrics-strip article > span:not(.metrics-strip__icon),
.status-grid span {
  color: inherit;
  font-size: 0.68rem;
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics-strip strong {
  grid-column: 2;
  align-self: end;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.workspace-grid {
  display: block;
  width: 100%;
}

.panel {
  min-width: 0;
  border-radius: var(--workspace-radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  animation: rise 0.66s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel--contacts {
  overflow: visible;
}

.workspace-main .panel[id] {
  scroll-margin-top: 170px;
}

.workspace-grid > [data-workspace-page] {
  display: none;
}

.workspace-grid > [data-workspace-page].is-active {
  display: grid;
  gap: 18px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 48%, #9ca7b2) 0%, rgba(156, 167, 178, 0.16) 72%, transparent 100%);
}

.panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.inline-form--compact {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.inline-form--compact .button {
  grid-column: 1 / -1;
}

.inline-form--planning {
  grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
}

.inline-form--planning .button,
.inline-form--appointments .button {
  grid-column: 1 / -1;
}

.inline-form--appointments {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.inline-form--message {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.inline-form--voice {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.inline-form--contacts {
  grid-template-columns: minmax(260px, 1fr) minmax(132px, 168px) minmax(178px, 220px) auto auto;
}

.inline-form--contacts .inline-form__wide {
  min-width: min(560px, 100%);
}

.inline-form--contacts .inline-form__tiny {
  min-width: 132px;
}

.inline-form--contacts .inline-form__sort {
  min-width: 178px;
}

.inline-form--contacts .inline-form__tiny select {
  min-height: 40px;
}

.inline-form--contacts .inline-form__sort select {
  min-height: 40px;
}

.inline-form--contacts .button {
  min-height: 50px;
}

.telephony-panel {
  display: grid;
  gap: 22px;
}

.telephony-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.telephony-hero__copy {
  display: grid;
  gap: 0.42rem;
}

.telephony-hero__copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.3rem, 3.8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.telephony-hero__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.32;
}

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

.telephony-kpi {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 90px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: var(--workspace-radius);
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(240, 244, 250, 0.92));
  padding: 18px 20px;
}

.telephony-kpi__icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
}

.telephony-kpi__icon svg {
  width: 22px;
  height: 22px;
}

.telephony-kpi__icon .telephony-action-icon {
  width: 22px;
  height: 22px;
}

.telephony-kpi--accepted .telephony-kpi__icon {
  background: rgba(111, 193, 69, 0.18);
  color: #5da93a;
}

.telephony-kpi--rauka .telephony-kpi__icon {
  position: relative;
  background: rgba(31, 122, 92, 0.14);
  color: #145c45;
}

.telephony-kpi__ai-mark {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.telephony-kpi__spark {
  position: absolute;
  color: currentColor;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
}

.telephony-kpi__spark--one {
  top: 7px;
  right: 9px;
}

.telephony-kpi__spark--two {
  bottom: 8px;
  right: 6px;
  transform: scale(0.82);
}

.telephony-kpi__spark--three {
  bottom: 9px;
  left: 7px;
  transform: scale(0.72);
}

.telephony-kpi--outbound .telephony-kpi__icon {
  background: rgba(43, 145, 201, 0.18);
  color: #1688c4;
}

.telephony-kpi--missed .telephony-kpi__icon {
  background: rgba(247, 112, 96, 0.16);
  color: #ef6d5c;
}

.telephony-kpi--blocked .telephony-kpi__icon {
  background: rgba(97, 101, 109, 0.18);
  color: #60636b;
}

.telephony-kpi--voicemail .telephony-kpi__icon {
  background: rgba(43, 145, 201, 0.18);
  color: #1688c4;
}

.telephony-kpi__copy {
  display: grid;
  gap: 0.08rem;
}

.telephony-kpi__copy strong {
  color: var(--ink);
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.telephony-kpi__copy span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.telephony-records {
  display: grid;
  gap: 12px;
}

.telephony-filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(120px, 0.85fr)) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0 18px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.telephony-filterbar .field {
  margin-bottom: 0;
}

.telephony-filterbar .field > span {
  color: rgba(53, 59, 69, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telephony-filterbar__search {
  min-width: 0;
}

.telephony-filterbar__submit {
  min-height: 50px;
}

.telephony-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(245, 248, 252, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  padding: 14px 16px;
}

.telephony-selection-bar__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.telephony-selection-bar__copy strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.telephony-selection-bar__copy span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.telephony-selection-bar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.telephony-bulk-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.telephony-table {
  display: grid;
  gap: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.telephony-table__head,
.telephony-row {
  display: grid;
  grid-template-columns:
    32px
    minmax(160px, 1.05fr)
    minmax(155px, 0.84fr)
    minmax(170px, 0.96fr)
    minmax(170px, 0.98fr)
    minmax(220px, 1.2fr)
    minmax(280px, 1.35fr);
  gap: 12px;
  align-items: center;
  min-width: 1260px;
}

.telephony-table__head {
  padding: 12px 0;
  border-bottom: 1px solid rgba(156, 167, 178, 0.22);
  align-items: start;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telephony-table__cell {
  min-width: 0;
}

.telephony-table__head .telephony-table__cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telephony-table__cell--check,
.telephony-row__check {
  display: grid;
  place-items: center;
}

.telephony-table__cell--check input,
.telephony-row__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.telephony-table__cell--type,
.telephony-row__type {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telephony-table__cell--actions {
  display: flex;
  justify-content: flex-start;
  text-align: left;
}

.telephony-row__type,
.telephony-row__datetime,
.telephony-row__caller,
.telephony-row__callee,
.telephony-row__notes,
.telephony-row__actions {
  min-width: 0;
}

.telephony-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.telephony-row:hover {
  background: rgba(245, 248, 252, 0.52);
}

.telephony-row__type-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
}

.telephony-row__type-icon svg {
  width: 22px;
  height: 22px;
}

.telephony-row__type-icon .telephony-action-icon {
  width: 22px;
  height: 22px;
}

.telephony-row--accepted .telephony-row__type-icon {
  background: rgba(111, 193, 69, 0.14);
  color: #5da93a;
}

.telephony-row--missed .telephony-row__type-icon {
  background: rgba(247, 112, 96, 0.14);
  color: #ef6d5c;
}

.telephony-row--blocked .telephony-row__type-icon {
  background: rgba(97, 101, 109, 0.16);
  color: #60636b;
}

.telephony-row--voicemail .telephony-row__type-icon {
  background: rgba(43, 145, 201, 0.14);
  color: #1688c4;
}

.telephony-row--outbound .telephony-row__type-icon {
  background: rgba(43, 145, 201, 0.12);
  color: #185c78;
}

.telephony-row__check-placeholder {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: 4px;
  background: rgba(247, 250, 253, 0.7);
}

.telephony-row__type-copy {
  display: grid;
  gap: 0.16rem;
}

.telephony-row__type-copy strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.telephony-row__type-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.telephony-row__datetime {
  display: grid;
  gap: 0.16rem;
  font-variant-numeric: tabular-nums;
}

.telephony-row__datetime strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.telephony-row__datetime span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.telephony-row__caller a,
.telephony-row__caller strong,
.telephony-row__callee strong {
  color: var(--accent-dark);
  font-weight: 760;
}

.telephony-row__caller a,
.telephony-row__callee span {
  display: block;
  text-decoration: none;
}

.telephony-row__caller a:hover {
  text-decoration: underline;
}

.telephony-row__caller-stack {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.telephony-row__caller .telephony-row__caller-name {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 780;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telephony-row__caller-number {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.telephony-row__caller-number .telephony-row__number-link {
  display: inline;
  font-size: inherit;
}

.telephony-row__callee {
  display: grid;
  gap: 0.16rem;
}

.telephony-row__callee span,
.telephony-row__caller {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.telephony-row__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.telephony-row__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.telephony-row--selected {
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
  background: rgba(247, 250, 253, 0.95);
}

.telephony-row--workflow-done {
  opacity: 0.68;
}

.telephony-row__details {
  grid-column: 2 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
}

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

.telephony-row__number-link {
  color: var(--accent-dark);
  text-decoration: none;
}

.telephony-row__number-link:hover {
  text-decoration: underline;
}

.telephony-callback-shell {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
  scroll-margin-top: 28px;
}

.telephony-callback-shell.is-focused {
  border-color: rgba(134, 86, 191, 0.32);
  box-shadow:
    0 0 0 1px var(--accent-border),
    0 18px 30px -26px rgba(134, 86, 191, 0.45);
}

.telephony-outbound-shell {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.54);
  padding: 14px;
}

.telephony-outbound-shell.is-focused {
  border-color: rgba(43, 145, 201, 0.34);
  box-shadow:
    0 0 0 1px rgba(43, 145, 201, 0.16),
    0 16px 28px -24px rgba(43, 145, 201, 0.4);
}

.telephony-outbound-form {
  align-items: center;
}

.call-banner--compact {
  margin-bottom: 0;
  padding: 9px 12px;
  border-radius: var(--workspace-radius);
}

.call-banner--success {
  border-color: rgba(111, 193, 69, 0.34);
  background:
    linear-gradient(135deg, rgba(111, 193, 69, 0.14), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.66);
}

.call-banner--warn {
  border-color: rgba(237, 156, 64, 0.36);
  background:
    linear-gradient(135deg, rgba(237, 156, 64, 0.14), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.66);
}

.call-banner--error {
  border-color: rgba(229, 88, 78, 0.36);
  background:
    linear-gradient(135deg, rgba(229, 88, 78, 0.14), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.66);
}

.telephony-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.telephony-section__header .eyebrow {
  margin-bottom: 4px;
}

.telephony-section__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.06rem, 1.25vw, 1.22rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.inline-form--triage {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.inline-form--intake,
.inline-form--intake-case {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.form-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.form-stack .inline-form {
  margin-bottom: 0;
}

.form-stack .inline-form:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.case-context {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.quality-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.case-context .eyebrow {
  margin-bottom: 0;
}

.quality-section .eyebrow {
  margin-bottom: 0;
}

.planning-grid,
.reporting-grid,
.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.reporting-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planning-column,
.reporting-column,
.operations-column {
  display: grid;
  gap: 10px;
}

.planning-column .eyebrow,
.reporting-column .eyebrow,
.operations-column .eyebrow {
  margin-bottom: 0;
}

.operations-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.field--wide,
.inline-form--message .button,
.inline-form--triage .button,
.inline-form--intake .button,
.inline-form--intake-case .button {
  grid-column: 1 / -1;
}

.list {
  display: grid;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.search-results {
  display: grid;
  gap: 10px;
  max-height: none;
  overflow: visible;
}

.sidebar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.panel--search {
  display: grid;
  gap: 14px;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(31, 37, 35, 0.1);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.42);
}

.search-result__copy {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.search-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 8px;
}

.search-result strong {
  letter-spacing: -0.02em;
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.32;
}

.call-banner {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 16px;
  border: 0;
  border-left: 4px solid rgba(156, 167, 178, 0.34);
  border-radius: var(--workspace-radius);
  background:
    linear-gradient(135deg, rgba(246, 248, 250, 0.84), rgba(255, 255, 255, 0.64)),
    rgba(255, 255, 255, 0.54);
  padding: 15px 16px;
}

.call-banner strong {
  letter-spacing: -0.02em;
}

.call-banner span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.32;
}

.list--soft {
  gap: 8px;
}

.contact-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.72);
}

.contact-subnav__button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: calc(var(--workspace-radius) - 5px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.contact-subnav__button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(106, 73, 151, 0.18);
}

.contact-subview[hidden] {
  display: none;
}

.contact-discovery-workspace__form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 0.8fr) minmax(180px, 0.85fr) minmax(140px, 0.5fr) minmax(110px, 0.4fr) auto;
  gap: 10px;
  align-items: end;
  overflow: visible;
}

.contact-discovery-dropdown {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.contact-discovery-dropdown__button {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: calc(var(--workspace-radius) - 2px);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-discovery-dropdown__menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  max-height: min(280px, 46vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: grid;
  grid-auto-rows: minmax(34px, auto);
  gap: 1px;
  padding: 6px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: #fff;
  box-shadow: var(--workspace-shadow);
}

.contact-discovery-dropdown__menu[hidden] {
  display: none;
}

.contact-discovery-dropdown__option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
}

.contact-discovery-dropdown__option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--accent);
  justify-self: center;
}

.contact-discovery-dropdown__option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-discovery-dropdown__option:hover {
  background: rgba(106, 73, 151, 0.08);
}

.contact-discovery-workspace__summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.contact-discovery-results,
.contact-discovery-history__list {
  margin-top: 10px;
}

.contact-discovery-result,
.contact-discovery-history__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.82);
}

.contact-discovery-result__main,
.contact-discovery-history__item {
  min-width: 0;
}

.contact-discovery-result__main strong,
.contact-discovery-history__item strong,
.contact-discovery-result__main span,
.contact-discovery-history__item span,
.contact-discovery-result__main small,
.contact-discovery-history__item small {
  display: block;
  overflow-wrap: anywhere;
}

.contact-discovery-result__main span,
.contact-discovery-history__item span,
.contact-discovery-result__main small,
.contact-discovery-history__item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-discovery-result__meta,
.contact-discovery-result__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}
.contact-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.contact-workbench__main,
.contact-workbench__side {
  min-width: 0;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(260px, 1.1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-width: 860px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.contact-card:hover {
  background: rgba(245, 248, 252, 0.52);
}

.contact-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.contact-card__identity > div,
.contact-card__fields {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.contact-card__identity strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.contact-card__identity span,
.contact-card__fields span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card__swatch {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: var(--contact-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(31, 37, 35, 0.14);
}

.contact-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 160px;
}

.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 1080px) {
  .contact-discovery-workspace__form,
  .contact-discovery-result,
  .contact-discovery-history__item,
  .inline-form--contacts,
  .contact-workbench {
    grid-template-columns: 1fr;
  }

  .contact-editor-modal__grid--identity,
  .contact-editor-modal__columns,
  .contact-editor-modal__tool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-editor-modal__field--company,
  .contact-editor-modal__columns--single {
    grid-column: 1 / -1;
  }

  .contact-editor-modal__columns--single {
    grid-template-columns: 1fr;
  }

  .contact-dialer-modal__body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-dialer-modal__form {
    align-content: start;
    padding: 0;
  }

  .inline-form--contacts .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .panel__actions,
  .contact-editor-modal__actions,
  .contact-dialer-modal__actions {
    justify-content: stretch;
  }

  .contact-dialer-modal__actions {
    grid-template-columns: 1fr;
  }

  .panel__actions > *,
  .contact-editor-modal__actions > .button,
  .contact-dialer-modal__actions > .button {
    width: 100%;
  }

  .contact-dialer-modal {
    padding: 10px;
  }

  .contact-dialer-modal__card {
    width: min(100%, calc(100vw - 20px));
    border-radius: 20px;
  }

  .contact-dialer-modal__header {
    padding-inline: 52px;
  }

  .contact-dialer-modal__body {
    padding-inline: 16px;
  }

  .contact-editor-modal__grid,
  .contact-editor-modal__grid--identity,
  .contact-editor-modal__columns,
  .contact-editor-modal__tool,
  .contact-editor-modal__field--wide,
  .contact-editor-modal__field--company,
  .contact-editor-modal__field--full {
    grid-template-columns: 1fr;
    grid-column: 1 / -1;
  }

  .contact-editor-modal__tool-row,
  .contact-editor-modal__merge-table {
    grid-template-columns: 1fr;
  }

  .contact-editor-modal__match,
  .channel-recipient-modal__search,
  .channel-recipient-modal__item,
  .channel-recipient-modal__value {
    grid-template-columns: 1fr;
  }

  .channel-recipient-modal__values {
    justify-content: stretch;
  }

  .channel-recipient-modal__value {
    width: 100%;
  }
}

.list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(156, 167, 178, 0.08);
  border-radius: var(--workspace-radius);
  background: rgba(247, 250, 253, 0.9);
  overflow: visible;
}

.list-pager__copy {
  display: grid;
  flex: 1 1 220px;
  gap: 4px;
  min-width: 0;
}

.list-pager__copy strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.list-pager__copy span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.list-pager__controls {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.list-pager__size {
  flex: 0 1 190px;
  min-width: min(170px, 100%);
  margin-bottom: 0;
}

.list-pager__nav {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.list-pager__nav .button {
  flex: 0 1 auto;
  min-width: 92px;
}

.list-pager__button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 28px -32px rgba(31, 37, 35, 0.28);
}

.item--call {
  align-items: start;
}

.item--document {
  align-items: start;
}

.item--selected {
  border-color: rgba(123, 135, 148, 0.34);
  box-shadow: inset 0 0 0 1px rgba(123, 135, 148, 0.08);
}

.item strong {
  display: block;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.32;
}

.item__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.item--document .item__actions {
  align-content: flex-start;
  padding-top: 2px;
}

.document-request {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.document-request__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.document-request__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.document-request__chips .chip {
  min-height: 28px;
  padding: 0.28rem 0.72rem;
  font-family: "Satoshi", "Geist", "Aptos", sans-serif;
  font-size: 0.8rem;
  font-weight: 820;
  letter-spacing: -0.005em;
  background: rgba(245, 247, 249, 0.9);
  color: #59636e;
}

.document-request__chips .chip--warn {
  background: rgba(155, 91, 24, 0.1);
  color: #7d5a32;
}

.document-request__chips .chip--danger {
  background: rgba(154, 59, 47, 0.1);
  color: #8b493f;
}

.document-request__chips .chip--info {
  background: rgba(43, 145, 201, 0.1);
  color: #1d789f;
}

.document-request__message {
  display: grid;
  gap: 0.2rem;
  max-width: min(62rem, 100%);
  margin-top: 0.12rem;
  padding: 0.58rem 0.78rem 0.62rem 0.9rem;
  border: 0;
  border-left: 4px solid var(--warn);
  border-radius: 0 var(--workspace-radius) var(--workspace-radius) 0;
  background:
    linear-gradient(90deg, rgba(155, 91, 24, 0.11), rgba(155, 91, 24, 0.035) 68%, rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.36);
  color: var(--ink);
  box-shadow: none;
}

.document-request__message > span {
  color: var(--warn);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-request__message > strong {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.98rem, 0.92rem + 0.22vw, 1.12rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.document-request__meta {
  font-size: 0.86rem;
}

.call-details {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
}

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

.call-details__item {
  display: grid;
  gap: 4px;
}

.call-details__item span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.call-details__item strong {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 760px) {
  .list-pager {
    flex-direction: column;
    align-items: stretch;
  }

  .list-pager__controls {
    width: 100%;
    justify-content: stretch;
  }

  .list-pager__size {
    min-width: 0;
    width: 100%;
  }

  .list-pager__nav {
    width: 100%;
  }

  .list-pager__nav .button {
    flex: 1 1 0;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.72rem;
  font-weight: 760;
}

.chip--warn {
  background: rgba(155, 91, 24, 0.12);
  color: var(--warn);
}

.chip--danger {
  background: rgba(154, 59, 47, 0.12);
  color: var(--danger);
}

.chip--info {
  background: rgba(43, 145, 201, 0.12);
  color: #1688c4;
}

.chip--success {
  background: rgba(80, 145, 84, 0.12);
  color: #3e7d42;
}

.panel--channels {
  min-height: min(76dvh, 820px);
}

.panel--channels .panel__actions {
  align-self: center;
}

.channel-new-message-button {
  min-height: 42px;
  padding-inline: 18px;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px -18px rgba(70, 34, 112, 0.56);
  white-space: nowrap;
}

.channel-workbench {
  display: grid;
  grid-template-columns: clamp(180px, 14vw, 350px) minmax(300px, 1fr) minmax(300px, 1.08fr);
  gap: 12px;
  min-height: 0;
}

.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane {
  min-width: 0;
}

.channel-mailboxes {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(247, 250, 253, 0.72);
}

.channel-mailbox {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  width: 100%;
  min-height: 42px;
  padding: 9px 34px 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.channel-mailbox__icon {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.channel-mailbox__fa-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  overflow: visible;
}

.channel-mailbox__fa-icon path {
  fill: currentColor;
  stroke: none;
}

.channel-mailbox__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.channel-mailbox:hover,
.channel-mailbox:focus-visible,
.channel-mailbox.is-active {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
}

.channel-mailbox::after {
  content: attr(data-count);
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 22px;
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(123, 135, 148, 0.12);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.channel-mailbox.is-active::after {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.channel-mailbox strong {
  font-size: 0.9rem;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-mailbox > span:not(.channel-mailbox__icon):not(.channel-mailbox__copy),
.channel-mailbox__copy > span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  display: none;
}

.channel-mailbox.is-active > span:not(.channel-mailbox__icon):not(.channel-mailbox__copy),
.channel-mailbox.is-active .channel-mailbox__copy > span {
  display: block;
}

.channel-list-pane,
.channel-detail-pane {
  display: grid;
  align-content: start;
  gap: 10px;
}

.channel-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(128px, 0.45fr) auto;
  align-items: center;
  gap: 8px;
}

.channel-toolbar .button {
  min-height: 42px;
}

.channel-overview {
  margin-bottom: 0;
  padding: 9px 11px;
  border-style: solid;
  background: rgba(247, 250, 253, 0.66);
}

.channel-overview strong {
  font-size: 0.92rem;
}

.channel-overview span {
  font-size: 0.78rem;
}

.channel-message-list {
  display: grid;
  gap: 7px;
  max-height: min(54dvh, 620px);
  min-width: 0;
  overflow: auto;
  padding-right: 2px;
}

.channel-message {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid rgba(156, 167, 178, 0.14);
  border-left: 4px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.channel-message:hover,
.channel-message:focus-visible,
.channel-message.is-selected {
  border-color: var(--accent-border);
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.channel-message__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.channel-message__head strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.channel-message__head time {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.channel-message p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.channel-message > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.channel-detail {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.78);
}

.channel-detail__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.channel-detail__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.channel-detail__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 280px;
}

.channel-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.channel-detail__body {
  min-height: 96px;
  max-height: min(26dvh, 280px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: 8px;
  background: rgba(246, 248, 250, 0.74);
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.channel-detail__meta {
  margin-top: 0;
}

.channel-detail__technical {
  border-top: 1px solid rgba(156, 167, 178, 0.16);
  padding-top: 8px;
}

.channel-detail__technical summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
}

.channel-detail__technical .channel-detail__meta {
  margin-top: 8px;
}

.channel-composer {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(247, 250, 253, 0.76);
}

.channel-composer.is-draft-active {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px -28px rgba(70, 34, 112, 0.42);
}

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

.channel-composer__bar strong {
  font-size: 0.96rem;
}

.channel-composer__bar span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.channel-composer textarea {
  min-height: 86px;
}

.channel-composer-extra,
.channel-template-context-shell {
  grid-column: 1 / -1;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 8px 10px;
}

.channel-composer-extra summary,
.channel-template-context-shell summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
}

.channel-composer-extra__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.channel-template-context-shell .field {
  margin-top: 8px;
}

.channel-composer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.channel-recipient-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
  align-items: stretch;
}

.channel-recipient-control input {
  min-width: 0;
}

.channel-recipient-picker-button {
  display: inline-grid;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-dark);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.channel-recipient-picker-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.channel-recipient-picker-button:hover,
.channel-recipient-picker-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
  transform: translateY(-1px);
}

.channel-recipient-modal[hidden] {
  display: none;
}

.channel-recipient-modal {
  position: fixed;
  inset: 0;
  z-index: 1004;
  display: grid;
  place-items: center;
  padding: 18px;
}

.channel-recipient-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.46);
  backdrop-filter: blur(4px);
}

.channel-recipient-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(760px, calc(100vw - 32px));
  max-height: min(86dvh, 720px);
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(156, 167, 178, 0.28);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.channel-recipient-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(156, 167, 178, 0.2);
}

.channel-recipient-modal__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
}

.channel-recipient-modal__header span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.channel-recipient-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.channel-recipient-modal__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.channel-recipient-modal__search .mini-button {
  min-height: 40px;
}

.channel-recipient-modal__status {
  padding: 8px 10px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.76);
  color: var(--ink);
  font-size: 0.83rem;
  line-height: 1.35;
}

.channel-recipient-modal__status--error {
  border-color: rgba(162, 79, 84, 0.28);
  background: rgba(162, 79, 84, 0.1);
  color: var(--danger);
}

.channel-recipient-modal__status--success {
  border-color: rgba(111, 193, 69, 0.32);
  background: rgba(111, 193, 69, 0.12);
  color: #426f2d;
}

.channel-recipient-modal__status--warn {
  border-color: rgba(205, 142, 67, 0.34);
  background: rgba(205, 142, 67, 0.12);
  color: #855a22;
}

.channel-recipient-modal__list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 90px;
  max-height: 100%;
  min-block-size: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 4px 2px 0;
}

.channel-recipient-modal__item {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1.18fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: 8px;
  background: rgba(247, 250, 253, 0.68);
}

.channel-recipient-modal__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.channel-recipient-modal__identity strong,
.channel-recipient-modal__identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-recipient-modal__identity strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.channel-recipient-modal__identity span {
  color: var(--muted);
  font-size: 0.76rem;
}

.channel-recipient-modal__swatch {
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: var(--contact-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(31, 37, 35, 0.14);
}

.channel-recipient-modal__values {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.channel-recipient-modal__value {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  max-width: 100%;
  text-align: left;
}

.channel-recipient-modal__value span {
  color: inherit;
  font-weight: 850;
}

.channel-recipient-modal__value strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.call-details__events {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.call-gdt-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.06);
}

.call-gdt-panel--success {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.07);
}

.call-gdt-panel--warn {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(217, 119, 6, 0.08);
}

.call-gdt-panel--danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.07);
}

.call-gdt-panel__head,
.call-gdt-panel__actions,
.call-gdt-panel__candidate,
.call-gdt-panel__conflicts label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-gdt-panel__head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.call-gdt-panel__head span,
.call-gdt-panel__candidate span {
  color: var(--muted);
  font-size: 0.82rem;
}

.call-gdt-panel__actions {
  flex-wrap: wrap;
  margin-top: 10px;
}

.call-gdt-panel__candidates,
.call-gdt-panel__conflicts {
  display: grid;
  gap: 8px;
}

.call-gdt-panel__candidate {
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.call-gdt-panel__candidate div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.call-gdt-panel__candidate.is-selected {
  border-color: rgba(22, 163, 74, 0.32);
}

.call-gdt-panel__conflicts label {
  justify-content: space-between;
  padding: 6px 0;
}

.call-gdt-panel__conflicts select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  padding: 0.36rem 0.64rem;
  font-size: 0.82rem;
  font-weight: 760;
}

a.mini-button {
  text-decoration: none;
}

.mini-button--primary {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mini-button--success {
  border-color: rgba(34, 125, 85, 0.28);
  background: rgba(34, 125, 85, 0.1);
  color: #1b6848;
}

.mini-button--success:hover,
.mini-button--success:focus-visible {
  background: rgba(34, 125, 85, 0.16);
  outline: none;
}

.document-contact-add-button {
  width: 34px;
  min-width: 34px;
  min-height: 30px;
  padding: 0;
  gap: 0;
}

.document-contact-add-button__icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.document-contact-add-button.is-existing,
.document-contact-add-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}


.mini-button.is-busy {
  cursor: wait;
  opacity: 0.76;
}

.mini-button.is-busy::before {
  content: "";
  width: 0.78em;
  height: 0.78em;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: mini-button-spinner 0.72s linear infinite;
}

@keyframes mini-button-spinner {
  to {
    transform: rotate(360deg);
  }
}

.mini-button:active {
  transform: translateY(1px);
}

.telephony-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 8px;
  white-space: nowrap;
}

.telephony-action-button:hover,
.telephony-action-button:focus-visible {
  border-color: color-mix(in srgb, currentColor 42%, var(--line));
  outline: none;
}

.telephony-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.telephony-action-button--rueckruf {
  color: var(--accent-contrast);
}

.mini-button.telephony-action-button--rueckruf {
  border-color: rgba(43, 145, 201, 0.28);
  background: rgba(43, 145, 201, 0.1);
  color: #185c78;
}

.mini-button.telephony-action-button--rueckruf:hover,
.mini-button.telephony-action-button--rueckruf:focus-visible {
  background: rgba(43, 145, 201, 0.16);
  color: #104a62;
}

.telephony-action-button--redial {
  color: #354451;
}

.telephony-action-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.18em;
  height: 1.18em;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.telephony-action-icon--wahlwiederholung {
  -webkit-mask-image: var(--telephony-icon-wahlwiederholung);
  mask-image: var(--telephony-icon-wahlwiederholung);
}

.telephony-action-icon--rueckruf {
  -webkit-mask-image: var(--telephony-icon-rueckruf);
  mask-image: var(--telephony-icon-rueckruf);
}

.telephony-reverse-search-button {
  width: 30px;
  min-width: 30px;
  padding: 0;
}

.telephony-reverse-search-button img {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

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

.status-grid div {
  display: grid;
  gap: 0.32rem;
  padding: 14px 0;
  border-top: 1px solid rgba(156, 167, 178, 0.2);
}

.status-grid strong {
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.event-log {
  min-height: 132px;
  margin-top: 18px;
  border-radius: var(--workspace-radius);
  background: rgba(245, 247, 249, 0.9);
  color: var(--ink);
  border: 1px solid rgba(156, 167, 178, 0.22);
  padding: 16px;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.event-log p {
  margin: 0 0 0.45rem;
}

.empty,
.error {
  border: 1px dashed rgba(31, 37, 35, 0.2);
  border-radius: var(--workspace-radius);
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.34);
}

.error {
  border-color: rgba(154, 59, 47, 0.35);
  color: var(--danger);
}

.skeleton {
  height: 72px;
  border-radius: var(--workspace-radius);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.32));
  background-size: 220% 100%;
  animation: shimmer 1.15s infinite linear;
}

.skeleton--short {
  width: 72%;
}

@keyframes shimmer {
  from {
    background-position: 160% 0;
  }
  to {
    background-position: -60% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.64;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@media (max-width: 1080px) {
  body {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .workspace-side-toggle,
  .workspace-focus-controls {
    display: none;
  }

  .poks-shell-chrome {
    margin-top: 12px;
    border-radius: 0 0 var(--workspace-radius) var(--workspace-radius);
  }

  .poks-topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "center center";
    gap: 10px 12px;
    min-height: auto;
    padding: 8px 10px;
  }

  .topbar-left {
    grid-area: left;
  }

  .topbar-center {
    grid-area: center;
    justify-content: flex-start;
    width: 100%;
  }

  .topbar-right {
    grid-area: right;
  }

  .shell {
    height: 100%;
    min-height: 100dvh;
  }

  .workspace-layout,
  .hero,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .channel-workbench {
    grid-template-columns: 1fr;
  }

  .channel-mailboxes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .channel-toolbar,
  .channel-detail__header,
  .channel-composer__bar {
    grid-template-columns: 1fr;
  }

  .channel-detail__actions,
  .channel-composer__actions {
    justify-content: flex-start;
    max-width: none;
  }

  .metrics-strip {
    position: static;
    overflow-x: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 12px;
    padding: 0;
  }

  .workspace-sidebar,
  .workspace-rail {
    position: static;
  }

  .workspace-main {
    display: flex;
    flex-direction: column;
    align-content: stretch;
    flex: 1 1 auto;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    min-height: 0;
    padding-top: 0;
    padding-right: 0;
  }

  .workspace-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    height: 100%;
  }

  .shell > .poks-service-footer {
    margin-top: 20px;
  }

  .poks-service-footer {
    flex-basis: 88px;
    height: 88px;
    min-height: 88px;
    max-height: 88px;
  }

  .poks-service-footer,
  .poks-service-footer__text {
    align-items: flex-start;
    flex-direction: column;
  }

  .poks-service-footer__actions {
    width: 100%;
  }

  .poks-service-footer__link--manual {
    width: 100%;
  }
  .workspace-nav {
    position: static;
    top: auto;
    z-index: auto;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .workspace-grid {
    order: 1;
    gap: 12px;
  }

  .workspace-sidebar,
  .workspace-rail {
    flex: 0 0 auto;
    max-height: clamp(180px, 22dvh, 260px);
    overflow-y: auto;
    padding-top: 0;
    min-height: 0;
  }

  .dashboard-signal,
  .metrics-strip article {
    animation: none;
  }

  .metrics-strip article {
    min-height: 60px;
    padding: 8px 10px 7px;
  }

  .panel--timeline {
    transform: none;
  }

  .inline-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-form .button {
    grid-column: 1 / -1;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .planning-grid,
  .reporting-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .telephony-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .telephony-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .telephony-filterbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .telephony-filterbar__search,
  .telephony-filterbar__submit {
    grid-column: 1 / -1;
  }

  .telephony-selection-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .telephony-selection-bar__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .telephony-table__head {
    display: none;
  }

  .telephony-row {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    row-gap: 12px;
    min-width: 0;
  }

  .telephony-row__type,
  .telephony-row__datetime,
  .telephony-row__caller,
  .telephony-row__callee,
  .telephony-row__notes,
  .telephony-row__actions,
  .telephony-row__details {
    grid-column: 2 / -1;
  }

  .telephony-row__actions {
    justify-content: flex-start;
  }

  .telephony-row__details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: auto;
  }

  .app-shell {
    position: relative;
    inset: auto;
    height: auto;
    overflow: visible;
  }

  .shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .poks-shell-chrome {
    margin-top: 10px;
    border-radius: 0 0 var(--workspace-radius) var(--workspace-radius);
  }

  .poks-topbar {
    gap: 8px 10px;
    padding: 8px 10px;
  }

  .topbar-left {
    font-size: 0.7rem;
  }

  .topbar-clock {
    min-width: 72px;
  }

  .topbar-center {
    padding: 4px 8px;
  }

  .topbar-area {
    max-width: 160px;
  }

  .shell {
    padding-inline: 10px;
    padding-bottom: 18px;
  }

  .metrics-strip {
    position: static;
    overflow-x: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 12px;
    padding: 0;
  }

  .channel-mailboxes,
  .channel-composer__grid {
    grid-template-columns: 1fr;
  }

  .channel-toolbar {
    gap: 10px;
  }

  .channel-message-list,
  .channel-detail__body {
    max-height: none;
  }

  .workspace-nav {
    display: grid;
    position: static;
    top: auto;
    z-index: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
  }

  .workspace-nav a {
    width: 100%;
    min-width: 0;
    height: auto;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    min-height: 44px;
    padding: 0.72rem 0.95rem;
  }

  .workspace-nav a[draggable="true"] {
    padding-left: 0.95rem;
  }

  .workspace-nav a[draggable="true"]::before {
    display: none;
  }

  .workspace-layout {
    height: auto;
    overflow: visible;
  }

  .workspace-main {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .workspace-sidebar,
  .workspace-rail {
    max-height: none;
    overflow: visible;
  }

  .telephony-kpis {
    grid-template-columns: 1fr;
  }

  .telephony-filterbar {
    grid-template-columns: 1fr;
  }

  .telephony-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .telephony-row__details-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-section,
  .workspace-rail .panel--chat {
    padding: 16px;
    border-radius: var(--workspace-radius);
  }

  .workspace-layout {
    gap: 14px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.7rem, 16vw, 4.3rem);
  }

  .command-panel,
  .panel,
  .metrics-strip article {
    border-radius: var(--workspace-radius);
  }

  .metrics-strip article {
    min-height: 58px;
    padding: 8px 10px 7px;
  }

  .panel {
    padding: 18px;
  }

  .panel__header,
  .item {
    grid-template-columns: 1fr;
  }

  .panel__header {
    display: grid;
  }

  .inline-form,
  .inline-form--compact {
    grid-template-columns: 1fr;
  }

  .item__actions {
    justify-content: start;
  }

.call-details__grid {
    grid-template-columns: 1fr;
  }
}

body[data-ui-surface="mobile"] {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
}

body[data-ui-surface="mobile"] .app-shell {
  position: relative;
  inset: auto;
  height: auto;
  overflow: visible;
}

body[data-ui-surface="mobile"] .shell {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body[data-ui-surface="mobile"] .poks-topbar {
  grid-template-columns: 1fr;
  grid-template-areas:
    "left"
    "center"
    "right";
  gap: 8px 10px;
  min-height: auto;
  padding: 8px 10px;
}

body[data-ui-surface="mobile"] .topbar-left,
body[data-ui-surface="mobile"] .topbar-center,
body[data-ui-surface="mobile"] .topbar-right {
  width: 100%;
}

body[data-ui-surface="mobile"] .topbar-center {
  justify-content: flex-start;
}

body[data-ui-surface="mobile"] .shell {
  padding-inline: 10px;
  padding-bottom: 18px;
}

body[data-ui-surface="mobile"] .metrics-strip {
  position: static;
  overflow-x: visible;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 12px;
  padding: 0;
}

body[data-ui-surface="mobile"] .workspace-nav {
  display: grid;
  position: static;
  top: auto;
  z-index: auto;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow: visible;
}

body[data-ui-surface="mobile"] .workspace-nav a {
  width: 100%;
  min-width: 0;
  height: auto;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  min-height: 44px;
  padding: 0.72rem 0.95rem;
}

body[data-ui-surface="mobile"] .workspace-nav a[draggable="true"] {
  padding-left: 0.95rem;
}

body[data-ui-surface="mobile"] .workspace-nav a[draggable="true"]::before {
  display: none;
}

body[data-ui-surface="mobile"] .workspace-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: auto;
  overflow: visible;
}

body[data-ui-surface="mobile"] .workspace-main {
  height: auto;
  overflow: visible;
  padding-right: 0;
}

body[data-ui-surface="mobile"] .workspace-sidebar,
body[data-ui-surface="mobile"] .workspace-rail {
  display: none;
}

body[data-ui-surface="mobile"] .workspace-layout {
  gap: 10px;
}

body[data-ui-surface="mobile"] .telephony-kpis {
  grid-template-columns: 1fr;
}

body[data-ui-surface="mobile"] .telephony-filterbar {
  grid-template-columns: 1fr;
}

body[data-ui-surface="mobile"] .telephony-selection-bar {
  align-items: flex-start;
  flex-direction: column;
}

body[data-ui-surface="mobile"] .telephony-selection-bar__actions {
  width: 100%;
  justify-content: flex-start;
}

body[data-ui-surface="mobile"] .telephony-table__head {
  display: none;
}

body[data-ui-surface="mobile"] .telephony-row {
  grid-template-columns: 28px minmax(0, 1fr);
}

body[data-ui-surface="mobile"] .telephony-row__type,
body[data-ui-surface="mobile"] .telephony-row__datetime,
body[data-ui-surface="mobile"] .telephony-row__caller,
body[data-ui-surface="mobile"] .telephony-row__callee,
body[data-ui-surface="mobile"] .telephony-row__notes,
body[data-ui-surface="mobile"] .telephony-row__actions,
body[data-ui-surface="mobile"] .telephony-row__details {
  grid-column: 2 / -1;
}

body[data-ui-surface="mobile"] .telephony-row__actions {
  justify-content: flex-start;
}

body[data-ui-surface="mobile"] .telephony-row__details-grid {
  grid-template-columns: 1fr;
}

body[data-ui-surface="desktop"] {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body[data-ui-surface="desktop"] .app-shell {
  position: fixed;
  inset: 0 0 10px;
  height: auto;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .shell {
  height: 100%;
  overflow-x: clip;
}

body[data-ui-surface="desktop"] .shell > .poks-service-footer {
  position: static;
}

body[data-ui-surface="desktop"] .poks-topbar {
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  grid-template-areas: none;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
}

body[data-ui-surface="desktop"] .topbar-left {
  grid-area: auto;
}

body[data-ui-surface="desktop"] .topbar-center {
  grid-area: auto;
  justify-content: center;
}

body[data-ui-surface="desktop"] .topbar-right {
  grid-area: auto;
}

body[data-ui-surface="desktop"] .workspace-layout {
  display: grid;
  grid-template-columns:
    var(--workspace-sidebar-left-width)
    minmax(0, 1fr)
    var(--workspace-sidebar-right-width);
  gap: 18px;
  align-self: stretch;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-main {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

body[data-ui-surface="desktop"] .workspace-sidebar,
body[data-ui-surface="desktop"] .workspace-rail {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
}

body[data-ui-surface="desktop"] .workspace-sidebar {
  display: grid;
  grid-template-rows: auto auto;
  align-self: start;
  align-content: start;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body[data-ui-surface="desktop"] .workspace-sidebar .sidebar-section {
  min-height: auto;
  overflow: visible;
}

body[data-ui-surface="desktop"] .workspace-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-rail .panel--chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-rail .chat-stage.internal-chat {
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-rail .internal-chat__feed {
  min-height: 0;
  max-height: none;
}

body[data-ui-surface="desktop"] .workspace-nav {
  display: flex;
  position: sticky;
  top: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: hidden;
}

body[data-ui-surface="desktop"] .workspace-nav a {
  flex: 0 1 clamp(9.75rem, 7.8vw, 11.75rem);
  width: auto;
  min-width: clamp(9.75rem, 7.8vw, 11.75rem);
  justify-content: center;
  text-align: center;
  white-space: normal;
}

body[data-ui-surface="desktop"] .workspace-nav a[data-workspace-feature="documents"] {
  flex: 0 1 clamp(14.5rem, 12vw, 18rem);
  min-width: clamp(14.5rem, 12vw, 18rem);
}

@media (min-width: 1400px) and (max-height: 1080px) {
  body[data-ui-surface="desktop"] .shell {
    --workspace-sidebar-left-width: clamp(210px, 14vw, 250px);
    --workspace-sidebar-right-width: clamp(560px, 32vw, 620px);
    padding: 0 clamp(8px, 1vw, 18px) 10px;
    font-size: 0.875rem;
  }

  body[data-ui-surface="desktop"] .poks-shell-chrome {
    margin-top: 4px;
    border-radius: 0 0 var(--workspace-radius) var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .poks-topbar {
    min-height: 30px;
    padding: 3px 10px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  body[data-ui-surface="desktop"] .topbar-icon-button {
    width: 26px;
    height: 26px;
  }

  body[data-ui-surface="desktop"] .metrics-strip {
    gap: 6px;
    margin: 4px 0 4px;
    padding: 4px 5px 5px;
  }

  body[data-ui-surface="desktop"] .metrics-strip article {
    min-height: 38px;
    padding: 5px 10px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .metrics-strip article > span:not(.metrics-strip__icon) {
    font-size: 0.54rem;
    letter-spacing: 0.07em;
  }

  body[data-ui-surface="desktop"] .metrics-strip__icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  body[data-ui-surface="desktop"] .metrics-strip strong {
    font-size: clamp(0.95rem, 1.15vw, 1.22rem);
  }

  body[data-ui-surface="desktop"] .workspace-nav {
    --workspace-nav-item-height: 40px;
    gap: 3px;
    margin: 4px 0 0;
    padding: 2px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .workspace-nav a {
    flex-basis: clamp(9.2rem, 7.1vw, 10.75rem);
    min-width: clamp(9.2rem, 7.1vw, 10.75rem);
    min-height: var(--workspace-nav-item-height);
    height: var(--workspace-nav-item-height);
    padding: 0.32rem 0.5rem;
    border-radius: var(--workspace-radius);
    font-size: 0.78rem;
    line-height: 1.02;
  }

  body[data-ui-surface="desktop"] .workspace-nav a[data-workspace-feature="documents"] {
    flex-basis: clamp(13rem, 10.5vw, 16rem);
    min-width: clamp(13rem, 10.5vw, 16rem);
  }

  body[data-ui-surface="desktop"] .workspace-nav__badge,
  body[data-ui-surface="desktop"] .workspace-side-toggle[data-unread-count]::after {
    transform: scale(0.82);
    transform-origin: center;
  }

  body[data-ui-surface="desktop"] .workspace-layout {
    gap: 8px;
  }

  body[data-ui-surface="desktop"] .workspace-main {
    padding-top: 2px;
    padding-right: 2px;
  }

  body[data-ui-surface="desktop"] .workspace-grid > [data-workspace-page].is-active {
    gap: 8px;
  }

  body[data-ui-surface="desktop"] .workspace-side-toggle {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 0.66rem;
  }

  body[data-ui-surface="desktop"] .workspace-focus-toggle {
    min-height: 26px;
    padding: 0.3rem 0.6rem;
    font-size: 0.66rem;
  }

  body[data-ui-surface="desktop"] .workspace-focus-controls {
    padding-bottom: 6px;
  }

  body[data-ui-surface="desktop"] .workspace-sidebar,
  body[data-ui-surface="desktop"] .workspace-rail {
    gap: 6px;
    padding-top: 2px;
  }

  body[data-ui-surface="desktop"] .sidebar-section,
  body[data-ui-surface="desktop"] .workspace-rail .panel--chat {
    padding: 10px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .panel {
    padding: 12px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .panel__header {
    margin-bottom: 8px;
    gap: 8px;
  }

  body[data-ui-surface="desktop"] .inline-form {
    gap: 7px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  body[data-ui-surface="desktop"] h1 {
    font-size: clamp(1.95rem, 3vw, 2.55rem);
  }

  body[data-ui-surface="desktop"] .field {
    gap: 6px;
  }

  body[data-ui-surface="desktop"] .field input,
  body[data-ui-surface="desktop"] .field select,
  body[data-ui-surface="desktop"] .button {
    min-height: 32px;
  }

  body[data-ui-surface="desktop"] .chat-stage {
    gap: 6px;
    min-height: 0;
    padding: 10px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .internal-chat__filters {
    gap: 5px;
  }

  body[data-ui-surface="desktop"] .internal-chat__filters .mini-button,
  body[data-ui-surface="desktop"] .internal-chat__message-actions .mini-button {
    min-height: 24px;
    padding: 0.24rem 0.5rem;
    font-size: 0.68rem;
  }

  body[data-ui-surface="desktop"] .internal-chat__feed {
    gap: 6px;
  }

  body[data-ui-surface="desktop"] .internal-chat__message {
    padding: 8px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .internal-chat__message-form textarea {
    min-height: 64px;
  }

  body[data-ui-surface="desktop"] .shell > .poks-service-footer {
    margin-top: 8px;
    margin-bottom: 4px;
  }

  body[data-ui-surface="desktop"] .poks-service-footer {
    flex-basis: 32px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 4px 10px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .poks-service-footer__link--manual {
    min-height: 24px;
    padding: 0.25rem 0.58rem;
  }
}

body[data-ui-surface="desktop"] .telephony-hero {
  align-items: flex-end;
  flex-direction: row;
}

body[data-ui-surface="desktop"] .telephony-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body[data-ui-surface="desktop"] .telephony-filterbar {
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(120px, 0.85fr)) auto;
}

body[data-ui-surface="desktop"] .telephony-selection-bar {
  align-items: center;
  flex-direction: row;
}

body[data-ui-surface="desktop"] .telephony-selection-bar__actions {
  width: auto;
  justify-content: flex-end;
}

body[data-ui-surface="desktop"] .telephony-table__head {
  display: grid;
}

body[data-ui-surface="desktop"] .telephony-row {
  grid-template-columns:
    32px
    minmax(160px, 1.05fr)
    minmax(155px, 0.84fr)
    minmax(170px, 0.96fr)
    minmax(170px, 0.98fr)
    minmax(220px, 1.2fr)
    minmax(280px, 1.35fr);
}

body[data-ui-surface="desktop"] .telephony-row__type,
body[data-ui-surface="desktop"] .telephony-row__datetime,
body[data-ui-surface="desktop"] .telephony-row__caller,
body[data-ui-surface="desktop"] .telephony-row__callee,
body[data-ui-surface="desktop"] .telephony-row__notes,
body[data-ui-surface="desktop"] .telephony-row__actions {
  grid-column: auto;
}

body[data-ui-surface="desktop"] .telephony-row__details {
  grid-column: 2 / -1;
}

body[data-ui-surface="desktop"] .telephony-row__details-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-discovery-research-links {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(133, 88, 179, 0.22);
  border-radius: var(--workspace-radius-sm, 8px);
  background: rgba(133, 88, 179, 0.06);
}

.contact-discovery-research-links span {
  color: var(--workspace-muted, #667085);
  font-size: 0.82rem;
  line-height: 1.35;
}
