:root {
  --bg: #f3fbff;
  --surface: #fff;
  --line: #dcecf6;
  --text: #10202b;
  --muted: #6b7b88;
  --primary: #18B8A8;
  --primary-soft: #e8fbf8;
  --pink: #2F80ED;
  --green: #18B8A8;
  --violet: #2F80ED;
  --blue: #6BB7FF;
  --orange: #ff9700;
  --red: #ef2f2f;
  --blue-strong: #2F80ED;
  --blue-soft: #6BB7FF;
  --aqua: #18B8A8;
  --radius-lg: 22px;
  --radius-md: 18px;
  --shadow: 0 10px 26px rgba(16, 32, 43, .055);
}

[hidden],
.dashboard-section[hidden],
.filters[hidden],
.call-summary-details[hidden],
.call-page[hidden],
.dialog-page[hidden],
.task-page[hidden],
.lead-page[hidden],
.deal-page[hidden],
.activity-page[hidden],
.employee-page[hidden],
.admin-page[hidden] {
  display: none !important;
}

.detail-page-mode .filters,
.detail-page-mode .dashboard-section,
.detail-page-mode .call-summary-details {
  display: none !important;
}

.startup-loading .filters,
.startup-loading .dashboard-section,
.startup-loading .call-summary-details,
.startup-loading .call-page,
.startup-loading .dialog-page,
.startup-loading .task-page,
.startup-loading .lead-page,
.startup-loading .deal-page,
.startup-loading .activity-page,
.startup-loading .employee-page,
.startup-loading .admin-page {
  display: none !important;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

.brand,
.topnav,
.top-actions,
.filters {
  display: flex;
  align-items: center;
}

.brand {
  gap: 8px;
  color: var(--primary);
  font-size: 19px;
}

.brand-logo {
  display: block;
  width: 180px;
  height: 74px;
  object-fit: contain;
  border-radius: 0;
}

.brand-mark { font-size: 18px; }
.brand strong { font-weight: 800; }

.brand em {
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--primary-soft);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.topnav {
  justify-content: center;
  gap: 6px;
}

.topnav button,
.top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 30px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #6f7686;
  font-weight: 700;
}

.topnav button { padding: 0 13px; }
.topnav button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

#adminNavButton {
  border: 1px solid rgba(24, 184, 168, .25);
  background: linear-gradient(135deg, rgba(24, 184, 168, .12), rgba(107, 183, 255, .14));
  color: var(--primary);
}

#adminNavButton.active {
  background: linear-gradient(135deg, var(--primary), var(--blue-strong));
  color: #fff;
}

.top-actions {
  gap: 8px;
  justify-content: flex-end;
}
.top-actions button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 14px;
}

.support-widget {
  position: relative;
}

.question-button {
  min-width: 132px;
  background: linear-gradient(135deg, rgba(24, 184, 168, .12), rgba(107, 183, 255, .18)) !important;
  border-color: rgba(47, 128, 237, .18) !important;
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 600 !important;
  box-shadow: 0 10px 24px rgba(47, 128, 237, .08);
}

.question-button:hover,
.question-button[aria-expanded="true"] {
  color: var(--primary) !important;
  border-color: rgba(24, 184, 168, .34) !important;
  transform: translateY(-1px);
}

.question-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(340px, calc(100vw - 28px));
  padding: 16px 18px;
  border: 1px solid rgba(107, 183, 255, .28);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 32, 43, .14);
  color: var(--text);
}

.question-popover[hidden] {
  display: none !important;
}

.question-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 30px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(107, 183, 255, .28);
  border-left: 1px solid rgba(107, 183, 255, .28);
  background: #fff;
  transform: rotate(45deg);
}

.question-popover strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
}

.question-popover p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.question-popover a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.page {
  max-width: 1720px;
  margin: 0 auto;
  padding: 22px 16px 32px;
}

.startup-loader {
  display: grid;
  min-height: calc(100vh - 110px);
  place-items: center;
  padding: 40px 16px;
}

.startup-loader-card {
  width: min(560px, 100%);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(24, 184, 168, .14), rgba(47, 128, 237, .12)),
    #fff;
  box-shadow: 0 18px 42px rgba(16, 32, 43, .08);
  padding: 28px;
}

.startup-loader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.startup-loader-head span {
  display: block;
  margin-bottom: 7px;
  color: #6b7b88;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.startup-loader-head strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  line-height: 1.18;
}

.startup-loader-head b {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

.startup-loader-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(107, 183, 255, .22);
}

.startup-loader-track i {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--blue-strong), var(--blue-soft));
  box-shadow: 0 0 18px rgba(47, 128, 237, .22);
  transition: width .28s ease;
}

.startup-loader p {
  margin: 16px 0 0;
  color: #536273;
  font-size: 15px;
}

.filters {
  gap: 14px;
  margin-bottom: 18px;
}

.select-field {
  display: flex;
  align-items: center;
  width: 230px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #667085;
}

.select-field span {
  margin-right: 8px;
  color: #8a93a4;
}

.select-field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #596173;
  font-weight: 650;
}

.section-picker {
  position: relative;
  width: 260px;
}

.section-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  width: 100%;
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.section-toggle::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  width: 8px;
  height: 8px;
  border-right: 2px solid #6b7b88;
  border-bottom: 2px solid #6b7b88;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.section-picker[data-open="true"] .section-toggle::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.section-toggle span {
  grid-column: 1;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-toggle strong {
  grid-column: 1;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 18px 36px rgba(16, 32, 43, .12);
}

.section-picker[data-open="true"] .section-menu {
  display: grid;
}

.section-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 14px;
  color: #4b5a66;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
}

.section-option:hover,
.section-option:has(input:checked) {
  background: #e8fbf8;
  color: #0f9589;
}

.section-option-all {
  border-bottom: 1px solid rgba(47, 128, 237, .1);
  border-radius: 14px 14px 10px 10px;
}

.section-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--aqua);
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #596173;
  font-size: 12px;
  font-weight: 700;
}

.toggle-field input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.analyze-button {
  min-height: 36px;
  margin-left: auto;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(91, 91, 214, .18);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  position: relative;
  min-height: 112px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid #e9edf3;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi-card span {
  display: block;
  margin-bottom: 12px;
  color: #737b8d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  font-size: clamp(28px, 3vw, 32px);
  line-height: 1;
  letter-spacing: -.04em;
}

.kpi-card small {
  display: block;
  margin-top: 5px;
  color: #9aa3b3;
  font-size: 13px;
  font-weight: 650;
}

.kpi-card i {
  position: absolute;
  top: 18px;
  right: 20px;
  font-style: normal;
  font-weight: 900;
}

.accent-pink i { color: var(--pink); }
.accent-green i { color: var(--green); }
.accent-violet i { color: var(--violet); }
.accent-blue i { color: var(--blue); }
.accent-orange i { color: var(--orange); }
.accent-red i { color: #ff6b18; }

.danger-line {
  position: absolute;
  right: 20px;
  bottom: 16px;
  left: 20px;
  height: 4px;
  border-radius: 999px;
  background: var(--red);
}

.section-title {
  margin: 0 0 14px;
}

.section-title h1 {
  margin: 0 0 5px;
  font-size: 21px;
}

.section-title h1::first-letter {
  color: var(--primary);
}

.section-title p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.table-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.table-search label {
  display: flex;
  align-items: center;
  width: min(720px, 100%);
  gap: 10px;
  color: #98a1b2;
}

.table-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #4b5566;
}

.table-search strong {
  color: #8f98aa;
  font-size: 12px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

th {
  height: 36px;
  padding: 0 16px;
  color: #8b94a7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.numeric .table-sort-button {
  justify-content: flex-end;
}

.table-sort-button:hover,
.table-sort-button.active {
  color: var(--blue);
}

.table-sort-button i {
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  opacity: 0;
}

.table-sort-button.active i {
  opacity: 1;
}

.table-sort-button[data-direction="desc"] i {
  border-top: 5px solid currentColor;
}

.table-sort-button[data-direction="asc"] i {
  border-bottom: 5px solid currentColor;
}

td {
  min-height: 68px;
  padding: 11px 16px;
  border-top: 1px solid #edf0f5;
  color: #202532;
  vertical-align: middle;
}

.numeric {
  text-align: right;
}

.employee-cell {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 170px;
}

.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #e5e7ff, #f0f7ff);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 28px;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-cell strong,
.employee-cell span,
.employee-cell small {
  display: block;
}

.employee-cell strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.employee-cell span,
.employee-cell small {
  color: #8e97a8;
  font-size: 12px;
  line-height: 1.3;
}

.department-cell {
  min-width: 185px;
  color: #586174;
  line-height: 1.5;
}

.main-number {
  font-weight: 900;
  font-size: 15px;
}

.sub-metric {
  display: block;
  margin-top: 5px;
  color: #8f98aa;
  font-size: 11px;
}

.sub-metric .up { color: #13a65b; }
.sub-metric .down { color: #f97316; }
.sub-metric .out { color: #0ea5e9; }

.call-cell-button {
  display: inline-grid;
  justify-items: end;
  min-width: 118px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: right;
}

.call-cell-button:hover,
.call-cell-button[aria-expanded="true"] {
  border-color: #dce3ef;
  background: #f7f9fc;
}

.active-call-row td {
  background: #fbfcff;
}

.call-details-row td {
  padding: 0 14px 12px;
  border-top: 0;
  background: #fbfcff;
}

.call-details-panel {
  padding: 12px 14px;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
  background: #fff;
}

.call-details-head,
.call-detail-row {
  display: grid;
  grid-template-columns: .95fr .86fr .62fr .58fr minmax(190px, 1.65fr);
  gap: 12px;
  align-items: center;
}

.call-details-head {
  margin-bottom: 10px;
  color: #667085;
  font-size: 12px;
}

.call-details-head strong {
  color: #1d2230;
  font-size: 13px;
}

.call-details-head span {
  grid-column: 1 / -1;
}

.call-detail-grid {
  display: grid;
  gap: 6px;
}

.call-detail-row {
  min-height: 30px;
  color: #667085;
  font-size: 12px;
}

.call-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.call-detail-row a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.call-detail-row .call-crm-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-kind {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.call-kind.incoming { background: #e8f7ef; color: #10a154; }
.call-kind.outgoing { background: #e7f5ff; color: #0284c7; }
.call-kind.missed { background: #fff2e5; color: #f97316; }
.call-kind.all { background: #eef0ff; color: var(--primary); }

.pill {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.pill.good { background: #e8f7ef; color: #10a154; }
.pill.warn { background: #fff2e5; color: #f97316; }
.pill.bad { background: #ffe9ec; color: #e0243e; }
.muted { color: #a2aaba; }
.pink { color: var(--pink); }
.red { color: var(--red); }
.violet { color: var(--violet); }
.blue { color: var(--blue); }
.orange { color: var(--orange); }
.green { color: var(--green); }

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px;
  }

  .topnav,
  .top-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

@media (max-width: 720px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .select-field,
  .toggle-field,
  .analyze-button {
    width: 100%;
    margin-left: 0;
  }

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

  .call-details-head,
  .call-detail-row {
    grid-template-columns: 1fr 1fr;
  }

  .call-details-head span {
    grid-column: 1 / -1;
  }
}

/* Minimal analytics layout, closer to the reference dashboard. */
body {
  background: #f7f8fb;
  font-size: 13px;
}

.topbar {
  min-height: 52px;
  padding: 0 38px;
  gap: 20px;
  background: #fff;
  box-shadow: none;
}

.brand {
  font-size: 18px;
}

.brand strong {
  font-weight: 760;
}

.brand-mark {
  color: #ff7544;
  font-size: 17px;
}

.brand em {
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 9px;
  letter-spacing: .16em;
}

.topnav {
  gap: 4px;
}

.topnav button,
.top-actions button {
  min-height: 28px;
  border-radius: 11px;
  color: #697283;
  font-size: 13px;
  font-weight: 650;
}

.topnav button {
  padding: 0 11px;
}

.top-actions button {
  padding: 0 12px;
}

.page {
  max-width: none;
  padding: 30px 38px 34px;
}

.filters {
  gap: 18px;
  margin-bottom: 24px;
}

.select-field {
  width: 250px;
  min-height: 36px;
  border-radius: 12px;
  background: #fff;
  color: #657087;
  box-shadow: none;
}

.select-field select {
  font-size: 13px;
  font-weight: 600;
}

.analyze-button {
  min-height: 42px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 720;
  box-shadow: 0 10px 24px rgba(91, 91, 214, .16);
}

.access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  margin-bottom: 22px;
  padding: 14px 24px;
  border: 1px solid rgba(91, 91, 214, .72);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.access-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.access-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--primary);
  font-size: 17px;
}

.access-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #151b28;
  font-size: 14px;
  font-weight: 720;
}

.access-copy p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.access-banner button,
.access-scope-pill {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 720;
}

.access-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: default;
  user-select: none;
}

.profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 118px;
  margin-bottom: 18px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 5px solid #f2f5fb;
  border-radius: 50%;
  background: #17313a;
  color: #d7f6ff;
  font-size: 15px;
  font-weight: 760;
}

.profile-main h1 {
  margin: 0 0 7px;
  color: #101827;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 760;
}

.profile-main p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.kpi-grid {
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  min-height: 144px;
  padding: 24px 26px;
  border-color: #e8ebf2;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.kpi-card span {
  margin-bottom: 18px;
  color: #6f7889;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .11em;
}

.kpi-card strong {
  font-size: 34px;
  font-weight: 760;
  letter-spacing: -.045em;
}

.kpi-card small {
  margin-top: 8px;
  color: #8f98aa;
  font-size: 13px;
  font-weight: 560;
}

.kpi-card i {
  top: 24px;
  right: 26px;
  font-size: 18px;
}

.danger-line {
  right: 26px;
  bottom: 24px;
  left: 26px;
  height: 4px;
}

.section-title {
  margin: 0 0 14px;
}

.section-title h1 {
  font-size: 22px;
  font-weight: 760;
}

.section-title p {
  font-size: 13px;
}

.table-shell {
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.table-search {
  min-height: 54px;
  padding: 0 24px;
}

th {
  height: 40px;
  color: #8993a5;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .1em;
}

td {
  min-height: 72px;
  padding: 12px 20px;
}

.employee-cell {
  grid-template-columns: 32px 1fr;
  min-width: 210px;
}

.avatar {
  width: 32px;
  height: 32px;
  color: #7b8496;
  font-size: 12px;
}

.employee-cell strong {
  font-size: 14px;
  font-weight: 720;
}

.employee-cell span,
.employee-cell small,
.department-cell {
  font-size: 12px;
}

.main-number {
  font-size: 14px;
  font-weight: 760;
}

.pill {
  font-weight: 760;
}

@media (max-width: 1100px) {
  .topbar,
  .page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .access-banner,
  .profile-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
}

/* Extra compact pass. */
.topbar {
  min-height: 40px;
  padding: 0 38px;
}

.brand {
  gap: 7px;
  font-size: 15px;
}

.brand-mark {
  font-size: 14px;
}

.brand em {
  padding: 2px 8px;
  font-size: 8px;
  letter-spacing: .18em;
}

.topnav button,
.top-actions button {
  min-height: 24px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 620;
}

.topnav button {
  padding: 0 9px;
}

.top-actions button {
  padding: 0 10px;
}

.page {
  padding-top: 20px;
}

.filters {
  gap: 12px;
  margin-bottom: 18px;
}

.select-field {
  width: 220px;
  min-height: 30px;
  border-radius: 10px;
}

.select-field select {
  font-size: 12px;
}

.analyze-button {
  min-height: 34px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 12px;
}

.access-banner {
  min-height: 58px;
  margin-bottom: 14px;
  padding: 10px 18px;
  border-radius: 14px;
}

.access-icon {
  width: 22px;
  height: 22px;
  font-size: 14px;
}

.access-copy strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.access-copy p {
  font-size: 11px;
}

.access-banner button,
.access-scope-pill {
  min-height: 28px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 11px;
}

.profile-summary {
  min-height: 82px;
  margin-bottom: 14px;
}

.profile-summary {
  min-height: 62px;
}

.profile-main {
  gap: 16px;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border-width: 4px;
  font-size: 12px;
}

.profile-main h1 {
  margin-bottom: 4px;
  font-size: 19px;
}

.profile-main p {
  font-size: 11px;
}

.kpi-grid {
  gap: 12px;
  margin-bottom: 22px;
}

.kpi-card {
  min-height: 104px;
  padding: 16px 18px;
  border-radius: 13px;
}

.kpi-card span {
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: .12em;
}

.kpi-card strong {
  font-size: 28px;
  font-weight: 720;
}

.kpi-card small {
  margin-top: 5px;
  font-size: 11px;
}

.kpi-card i {
  top: 16px;
  right: 18px;
  font-size: 14px;
}

.danger-line {
  right: 18px;
  bottom: 14px;
  left: 18px;
  height: 3px;
}

.section-title {
  margin-bottom: 10px;
}

.section-title h1 {
  margin-bottom: 3px;
  font-size: 18px;
}

.section-title p {
  font-size: 12px;
}

.table-search {
  min-height: 42px;
  padding: 0 18px;
}

th {
  height: 34px;
  padding: 0 14px;
  font-size: 10px;
}

td {
  min-height: 60px;
  padding: 9px 14px;
}

.employee-cell {
  grid-template-columns: 28px 1fr;
  gap: 9px;
}

.avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.employee-cell strong {
  font-size: 12px;
}

.employee-cell span,
.employee-cell small,
.department-cell {
  font-size: 11px;
}

.main-number {
  font-size: 13px;
}

/* Thin line icons. */
.brand-mark {
  width: 13px;
  height: 13px;
  color: #ff7544;
  stroke-width: 1.35;
}

.topnav button,
.top-actions button,
.analyze-button,
.access-banner button,
.access-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.topnav .icon,
.top-actions .icon,
.analyze-button .icon,
.access-banner button .icon,
.access-scope-pill .icon {
  width: 12px;
  height: 12px;
  opacity: .82;
  stroke-width: 1.35;
}

.select-field > .icon {
  width: 12px;
  height: 12px;
  margin-right: 8px;
  color: #8a93a4;
  opacity: .78;
  stroke-width: 1.35;
}

.access-icon {
  color: var(--primary);
  stroke-width: 1.25;
}

.kpi-card i {
  line-height: 0;
  opacity: .86;
}

.kpi-card i .icon {
  width: 13px;
  height: 13px;
  stroke-width: 1.35;
}

.section-title h1 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
  stroke-width: 1.35;
}

.table-search .icon {
  width: 12px;
  height: 12px;
  color: #8a93a4;
  stroke-width: 1.35;
}

th .icon {
  width: 10px;
  height: 10px;
  margin-right: 5px;
  vertical-align: -1px;
  opacity: .8;
  stroke-width: 1.25;
}

/* Calls are intentionally more prominent: this KPI opens the drill-down panel. */
.calls-kpi-card {
  min-height: 178px;
  cursor: pointer;
  outline: 0;
}

.dialogs-kpi-card,
.leads-kpi-card,
.deals-kpi-card,
.activities-kpi-card,
.tasks-kpi-card {
  min-height: 178px;
  cursor: pointer;
  outline: 0;
}

.deals-kpi-card {
  min-height: 230px;
  overflow: visible;
  z-index: 3;
}

.activities-kpi-card {
  min-height: 230px;
}

.calls-kpi-card:hover,
.calls-kpi-card:focus-visible,
.calls-kpi-card[aria-expanded="true"],
.dialogs-kpi-card:hover,
.dialogs-kpi-card:focus-visible,
.dialogs-kpi-card[aria-expanded="true"],
.leads-kpi-card:hover,
.leads-kpi-card:focus-visible,
.leads-kpi-card[aria-expanded="true"],
.deals-kpi-card:hover,
.deals-kpi-card:focus-visible,
.deals-kpi-card[aria-expanded="true"],
.activities-kpi-card:hover,
.activities-kpi-card:focus-visible,
.activities-kpi-card[aria-expanded="true"],
.tasks-kpi-card:hover,
.tasks-kpi-card:focus-visible,
.tasks-kpi-card[aria-expanded="true"] {
  border-color: rgba(232, 62, 155, .36);
  box-shadow: 0 8px 22px rgba(232, 62, 155, .12);
}

.calls-kpi-card::after {
  content: none;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  color: #9aa3b3;
  font-size: 11px;
  font-weight: 650;
}

.calls-kpi-card[aria-expanded="true"]::after {
  color: var(--pink);
  content: "Детализация открыта";
}

.dialogs-kpi-card::after {
  content: none;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  color: #9aa3b3;
  font-size: 11px;
  font-weight: 650;
}

.dialogs-kpi-card[aria-expanded="true"]::after {
  color: var(--violet);
  content: "Страница диалогов открыта";
}

.leads-kpi-card::after {
  content: none;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  color: #9aa3b3;
  font-size: 12px;
  font-weight: 700;
}

.leads-kpi-card[aria-expanded="true"]::after {
  color: var(--blue);
  content: "Страница лидов открыта";
}

.deals-kpi-card::after {
  content: none;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  color: #9aa3b3;
  font-size: 12px;
  font-weight: 700;
}

.deals-kpi-card[aria-expanded="true"]::after {
  color: var(--green);
  content: "Страница сделок открыта";
}

.tasks-kpi-card::after {
  content: none;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  color: #9aa3b3;
  font-size: 11px;
  font-weight: 650;
}

.tasks-kpi-card[aria-expanded="true"]::after {
  color: var(--orange);
  content: "Страница задач открыта";
}

.activities-kpi-card::after {
  content: none;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  color: #9aa3b3;
  font-size: 11px;
  font-weight: 650;
}

.activities-kpi-card[aria-expanded="true"]::after {
  color: var(--violet);
  content: "Страница дел открыта";
}

.calls-kpi-card > strong {
  margin-bottom: 12px;
  font-size: 36px;
}

.dialogs-kpi-card > strong,
.leads-kpi-card > strong,
.deals-kpi-card > strong,
.activities-kpi-card > strong,
.tasks-kpi-card > strong {
  margin-bottom: 12px;
  font-size: 36px;
}

.call-breakdown,
.dialog-breakdown,
.lead-breakdown,
.deal-breakdown,
.activity-breakdown,
.task-breakdown {
  display: grid;
  gap: 7px;
  max-width: 260px;
  padding-bottom: 18px;
}

.call-stat,
.dialog-stat,
.lead-stat,
.deal-stat,
.activity-stat,
.task-stat {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  align-items: center;
  min-height: 25px;
  padding: 3px 0;
  border-bottom: 1px solid #edf0f5;
}

.call-stat span,
.dialog-stat span,
.lead-stat span,
.deal-stat span,
.activity-stat span,
.task-stat span {
  display: block;
  margin: 0;
  color: #626b7c;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: none;
}

.call-stat strong,
.dialog-stat strong,
.lead-stat strong,
.deal-stat strong,
.activity-stat strong,
.task-stat strong {
  display: block;
  color: #151b28;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.call-stat.incoming strong { color: #10a154; }
.call-stat.outgoing strong { color: #0284c7; }
.call-stat.missed strong { color: #f97316; }
.call-stat.duration strong { color: var(--pink); }
.dialog-stat.new strong { color: var(--violet); }
.dialog-stat.closed strong { color: #10a154; }
.dialog-stat.open strong { color: #f97316; }
.task-stat.open strong { color: #0284c7; }
.task-stat.overdue strong { color: #ef2f2f; }
.task-stat.done strong { color: #10a154; }
.task-stat.no-deadline strong { color: var(--orange); }
.activity-stat.in-work strong { color: #0284c7; }
.activity-stat.overdue strong,
.activity-stat.planned-overdue strong { color: #ef2f2f; }
.activity-stat.planned strong { color: #10a154; }
.activity-stat.no-planned strong { color: var(--violet); }

.lead-stat.new strong { color: var(--blue); }
.lead-stat.in-work strong { color: var(--violet); }
.lead-stat.closed strong { color: var(--green); }

.deal-stat.new strong { color: var(--blue); }
.deal-stat.in-work strong { color: var(--violet); }
.deal-stat.closed strong { color: var(--green); }
.deal-stat.won strong { color: var(--green); }
.deal-stat.lost strong { color: #ef2f2f; }

.call-stat strong,
.dialog-stat strong,
.lead-stat strong,
.deal-stat strong,
.activity-stat strong,
.task-stat strong {
  cursor: pointer;
}

.pipeline-dropdown {
  position: relative;
  max-width: min(100%, 340px);
  margin-top: 10px;
  padding-bottom: 22px;
}

.pipeline-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.pipeline-toggle::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  width: 7px;
  height: 7px;
  border-right: 2px solid #6f7889;
  border-bottom: 2px solid #6f7889;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.pipeline-dropdown[data-open="true"] .pipeline-toggle::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.pipeline-toggle span {
  grid-column: 1;
  margin: 0 0 3px;
  color: #737b8d;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pipeline-toggle strong {
  grid-column: 1;
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-menu {
  position: absolute;
  top: calc(100% - 16px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 220px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
}

.pipeline-dropdown[data-open="true"] .pipeline-menu {
  display: grid;
  gap: 4px;
}

.pipeline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 2px 0 6px;
  background: #fff;
}

.pipeline-action {
  min-height: 30px;
  border: 1px solid #d7ecff;
  border-radius: 9px;
  background: #f5fbff;
  color: #2f80ed;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pipeline-action:hover {
  border-color: rgba(24, 184, 168, .45);
  background: #eefbf9;
  color: #0f8f4c;
}

.pipeline-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.pipeline-option:hover,
.pipeline-option:has(input:checked) {
  background: #eefbf4;
  color: #0f8f4c;
}

.pipeline-option input {
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.pipeline-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
  white-space: normal;
}

.dialogs-kpi-card #kpiDialogsMeta:not(.kpi-detail-link),
.tasks-kpi-card #kpiTasksMeta:not(.kpi-detail-link) {
  position: absolute;
  top: 16px;
  right: 42px;
  max-width: 145px;
  margin: 0;
  text-align: right;
  line-height: 1.25;
}

.call-summary-details {
  margin: -10px 0 22px;
  padding: 18px;
  border: 1px solid rgba(232, 62, 155, .18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.call-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.call-summary-head strong {
  display: block;
  margin-bottom: 4px;
  color: #151b28;
  font-size: 16px;
  font-weight: 780;
}

.call-summary-head span {
  color: #697283;
  font-size: 12px;
}

.call-summary-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #e2e6ee;
  border-radius: 50%;
  background: #fff;
  color: #727b8d;
  font-size: 18px;
  line-height: 1;
}

.call-summary-grid {
  display: grid;
  gap: 8px;
}

.call-summary-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(5, minmax(72px, .7fr));
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  background: #fbfcff;
  color: #1d2230;
  text-align: left;
}

.call-summary-row:hover {
  border-color: rgba(232, 62, 155, .28);
  background: #fff;
}

.call-summary-row span {
  display: grid;
  gap: 2px;
}

.call-summary-row b {
  font-size: 15px;
  font-weight: 820;
}

.call-summary-row small {
  color: #8d96a7;
  font-size: 11px;
  font-weight: 650;
}

.call-summary-person strong {
  font-size: 13px;
  font-weight: 760;
}

@media (max-width: 900px) {
  .call-summary-row {
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(72px, .5fr));
  }
}

@media (max-width: 720px) {
  .dialogs-kpi-card #kpiDialogsMeta:not(.kpi-detail-link) {
    position: static;
    max-width: none;
    margin-top: 8px;
    text-align: left;
  }

  .tasks-kpi-card #kpiTasksMeta:not(.kpi-detail-link) {
    position: static;
    max-width: none;
    margin-top: 8px;
    text-align: left;
  }

  .calls-kpi-card::after {
    position: static;
    display: block;
    margin-top: 12px;
  }

  .dialogs-kpi-card::after {
    position: static;
    display: block;
    margin-top: 12px;
  }

  .leads-kpi-card::after {
    position: static;
    display: block;
    margin-top: 12px;
  }

  .tasks-kpi-card::after {
    position: static;
    display: block;
    margin-top: 12px;
  }

  .call-breakdown,
  .dialog-breakdown,
  .lead-breakdown,
  .deal-breakdown,
  .activity-breakdown,
  .task-breakdown {
    max-width: none;
    padding-bottom: 0;
  }

  .pipeline-dropdown {
    max-width: none;
    padding-bottom: 0;
  }

  .call-summary-details {
    margin-top: -6px;
    padding: 14px;
  }

  .call-summary-head {
    align-items: stretch;
  }

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

  .call-summary-person {
    grid-column: 1 / -1;
  }
}

.call-page {
  display: grid;
  gap: 16px;
}

.call-page[hidden],
.dialog-page[hidden],
.lead-page[hidden],
.deal-page[hidden],
.activity-page[hidden],
.task-page[hidden],
.admin-page[hidden] {
  display: none;
}

.dialog-page,
.lead-page,
.deal-page,
.activity-page,
.task-page,
.admin-page {
  display: grid;
  gap: 16px;
}

.call-page-head {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.call-page-head h1 {
  margin: 0 0 4px;
  color: #101827;
  font-size: 28px;
  font-weight: 780;
}

.call-page-head p {
  margin: 0;
  color: #687284;
  font-size: 13px;
}

.call-page-back {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  background: #fff;
  color: #4e596b;
  font-size: 12px;
  font-weight: 740;
}

.call-page-back:hover {
  border-color: rgba(232, 62, 155, .35);
  color: var(--pink);
}

.call-page-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.call-page-summary div {
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid #e8ebf2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.call-page-summary span {
  display: block;
  margin-bottom: 12px;
  color: #6f7889;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.call-page-summary strong {
  display: block;
  color: #111827;
  font-size: 26px;
  font-weight: 790;
}

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

.call-page-empty {
  width: min(560px, 100%);
  padding: 18px 20px;
  border: 1px solid #dfeaf5;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 26px rgba(16, 32, 43, .055);
  color: #4e596b;
}

.detail-empty-state {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.detail-empty-state strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
}

.detail-empty-state span {
  color: #687284;
  font-size: 13px;
  line-height: 1.45;
}

.detail-empty-refresh {
  justify-self: start;
  margin-top: 4px;
}

.dialog-empty-head {
  min-height: 54px;
}

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

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

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

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

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

.call-page-employee {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.dialog-page-employee {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.lead-page-employee {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.deal-page-employee {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.activity-page-employee {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.task-page-employee {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.call-page-employee.active {
  border-color: rgba(232, 62, 155, .3);
  box-shadow: 0 8px 20px rgba(232, 62, 155, .08);
}

.dialog-page-employee.active {
  border-color: rgba(124, 60, 255, .3);
  box-shadow: 0 8px 20px rgba(124, 60, 255, .08);
}

.lead-page-employee.active {
  border-color: rgba(34, 163, 242, .3);
  box-shadow: 0 8px 20px rgba(34, 163, 242, .08);
}

.deal-page-employee.active {
  border-color: rgba(23, 184, 110, .3);
  box-shadow: 0 8px 20px rgba(23, 184, 110, .08);
}

.activity-page-employee.active {
  border-color: rgba(124, 60, 255, .3);
  box-shadow: 0 8px 20px rgba(124, 60, 255, .08);
}

.task-page-employee.active {
  border-color: rgba(255, 151, 0, .34);
  box-shadow: 0 8px 20px rgba(255, 151, 0, .08);
}

.call-page-employee-main {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(86px, .7fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: #1d2230;
  text-align: left;
}

.dialog-page-employee-main {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(96px, .75fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: #1d2230;
  text-align: left;
}

.lead-page-employee-main {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(110px, .8fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: #1d2230;
  text-align: left;
}

.deal-page-employee-main {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(110px, .8fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: #1d2230;
  text-align: left;
}

.activity-page-employee-main {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(110px, .8fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: #1d2230;
  text-align: left;
}

.task-page-employee-main {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(110px, .8fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: #1d2230;
  text-align: left;
}

.call-page-employee-main:hover,
.call-page-employee-main[aria-expanded="true"] {
  background: #fbfcff;
}

.dialog-page-employee-main:hover,
.dialog-page-employee-main[aria-expanded="true"] {
  background: #fbfcff;
}

.lead-page-employee-main:hover,
.lead-page-employee-main[aria-expanded="true"] {
  background: #fbfcff;
}

.deal-page-employee-main:hover,
.deal-page-employee-main[aria-expanded="true"] {
  background: #fbfcff;
}

.activity-page-employee-main:hover,
.activity-page-employee-main[aria-expanded="true"] {
  background: #fbfcff;
}

.task-page-employee-main:hover,
.task-page-employee-main[aria-expanded="true"] {
  background: #fbfcff;
}

.call-page-employee-main > span,
.dialog-page-employee-main > span,
.lead-page-employee-main > span,
.deal-page-employee-main > span,
.activity-page-employee-main > span,
.task-page-employee-main > span {
  display: grid;
  gap: 3px;
}

.call-page-employee-main > span:not(.call-page-person),
.dialog-page-employee-main > span:not(.dialog-page-person),
.lead-page-employee-main > span:not(.lead-page-person),
.deal-page-employee-main > span:not(.deal-page-person),
.activity-page-employee-main > span:not(.activity-page-person),
.task-page-employee-main > span:not(.task-page-person) {
  box-sizing: border-box;
  justify-self: stretch;
  align-self: center;
  align-content: center;
  justify-items: center;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 15px;
  text-align: center;
}

.call-page-employee-main b,
.dialog-page-employee-main b,
.lead-page-employee-main b,
.deal-page-employee-main b,
.activity-page-employee-main b,
.task-page-employee-main b {
  color: #111827;
  font-size: 17px;
  font-weight: 820;
}

.call-page-employee-main small,
.dialog-page-employee-main small,
.lead-page-employee-main small,
.deal-page-employee-main small,
.activity-page-employee-main small,
.task-page-employee-main small {
  color: #8993a5;
  font-size: 11px;
  font-weight: 660;
  line-height: 1.2;
}

.call-page-person strong,
.dialog-page-person strong,
.lead-page-person strong,
.deal-page-person strong,
.activity-page-person strong,
.task-page-person strong {
  color: #151b28;
  font-size: 14px;
  font-weight: 760;
}

.call-page-detail-grid {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  background: #fbfcff;
}

.dialog-page-detail-grid {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  background: #fbfcff;
}

.dialog-page-detail-standalone {
  padding: 16px;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.lead-page-detail-grid {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  background: #fbfcff;
}

.deal-page-detail-grid {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  background: #fbfcff;
}

.activity-page-detail-grid {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  background: #fbfcff;
}

.deal-page-detail-standalone {
  padding: 16px;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.lead-page-detail-standalone {
  padding: 16px;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.task-page-detail-grid {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  background: #fbfcff;
}

.task-page-detail-standalone {
  padding: 16px;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.activity-page-detail-standalone {
  padding: 16px;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.call-page-detail-row {
  display: grid;
  grid-template-columns: .95fr .86fr .62fr .58fr minmax(190px, 1.65fr);
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.call-page-detail-head {
  display: grid;
  grid-template-columns: .95fr .86fr .62fr .58fr minmax(190px, 1.65fr);
  gap: 12px;
  align-items: center;
  padding: 0 10px 4px;
  color: #7b8495;
  font-size: 11px;
  font-weight: 780;
}

.call-page-detail-head span {
  min-width: 0;
  text-align: center;
}

.detail-column-sort {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) 12px;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  outline: none;
}

.detail-column-sort span {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-column-sort b {
  min-width: 12px;
  color: #2f80ed;
  font-size: 12px;
  line-height: 1;
}

.detail-column-sort.active,
.detail-column-sort:hover,
.detail-column-sort:focus-visible {
  color: #2f80ed;
}

.call-page-detail-head .detail-column-sort:first-child span,
.call-page-detail-head .detail-column-sort:last-child span {
  text-align: left;
}

.dialog-page-detail-head,
.lead-page-detail-head,
.deal-page-detail-head,
.activity-page-detail-head,
.task-page-detail-head {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 0 10px 4px;
  color: #7b8495;
  font-size: 11px;
  font-weight: 780;
}

.dialog-page-detail-head {
  grid-template-columns: minmax(260px, 1.5fr) minmax(210px, 1fr) 110px 110px;
}

.lead-page-detail-head {
  grid-template-columns: 1.55fr 1.05fr 1.05fr .75fr;
}

.deal-page-detail-head {
  grid-template-columns: 1.8fr 1fr 1fr .8fr;
}

.activity-page-detail-head {
  grid-template-columns: 1.7fr .9fr .75fr;
}

.task-page-detail-head {
  grid-template-columns: 1.6fr 1.05fr .9fr;
}

.task-page-detail-head.task-no-deadline {
  grid-template-columns: 1.8fr 1.05fr;
}

.dialog-page-detail-head span,
.lead-page-detail-head span,
.deal-page-detail-head span,
.activity-page-detail-head span,
.task-page-detail-head span {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-page-detail-head span:first-child,
.lead-page-detail-head span:first-child,
.deal-page-detail-head span:first-child,
.activity-page-detail-head span:first-child,
.task-page-detail-head span:first-child {
  text-align: left;
}

.dialog-page-detail-head .detail-column-sort:first-child span,
.lead-page-detail-head .detail-column-sort:first-child span,
.deal-page-detail-head .detail-column-sort:first-child span,
.activity-page-detail-head .detail-column-sort:first-child span,
.task-page-detail-head .detail-column-sort:first-child span {
  text-align: left;
}

.call-page-detail-row > span,
.call-page-detail-row > strong {
  min-width: 0;
}

.call-page-detail-row > span:nth-child(2),
.call-page-detail-row > span:nth-child(3),
.call-page-detail-row .call-actions {
  justify-self: center;
  text-align: center;
}

.call-page-detail-row .call-source,
.call-page-detail-row .call-actions {
  min-width: 0;
}

.call-page-detail-row .call-crm-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-page-detail-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(210px, 1fr) 110px 110px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.dialog-page-detail-row > * {
  min-width: 0;
}

.dialog-page-detail-row > span:nth-child(n+2) {
  justify-self: center;
  text-align: center;
}

.dialog-page-detail-row > strong {
  justify-self: start;
  overflow: hidden;
  max-width: 100%;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-page-detail-row {
  display: grid;
  grid-template-columns: 1.55fr 1.05fr 1.05fr .75fr;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.lead-page-detail-row > span:nth-child(n+2),
.lead-page-detail-row .task-actions {
  justify-self: center;
  text-align: center;
}

.deal-page-detail-row {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr .8fr;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.deal-page-detail-row > span:nth-child(n+2) {
  justify-self: center;
  text-align: center;
}

.activity-page-detail-row {
  display: grid;
  grid-template-columns: 1.7fr .9fr .75fr;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.activity-page-detail-row > span:nth-child(n+2),
.activity-page-detail-row .task-actions {
  justify-self: center;
  text-align: center;
}

.task-page-detail-row {
  display: grid;
  grid-template-columns: 1.6fr 1.05fr .9fr;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.task-page-detail-row.task-no-deadline {
  grid-template-columns: 1.8fr 1.05fr;
}

.task-page-detail-row > span:nth-child(n+2),
.task-page-detail-row .task-actions {
  justify-self: center;
  text-align: center;
}

.call-page-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.dialog-page-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.lead-page-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.deal-page-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.activity-page-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.task-page-detail-row strong {
  color: #1f2532;
  font-size: 12px;
}

.lead-title-link,
.deal-title-link,
.activity-title-link,
.task-title-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1f2532;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.lead-title-link:hover,
.deal-title-link:hover,
.activity-title-link:hover,
.task-title-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

[data-bitrix-path].bitrix-link-opened {
  color: #8a63d2;
}

[data-bitrix-path].bitrix-link-opened::after {
  content: " · открыто";
  color: #8b95aa;
  font-size: 11px;
  font-weight: 700;
}

.call-number-link.bitrix-link-opened,
.call-crm-link.bitrix-link-opened,
.call-action-link.bitrix-link-opened {
  border-color: rgba(138, 99, 210, .3);
  background: rgba(138, 99, 210, .08);
  color: #8a63d2;
}

.task-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.task-actions small {
  color: #8b95aa;
  font-size: 11px;
  font-weight: 720;
}

.dialog-kind {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.dialog-kind.open { background: #fff2e5; color: #f97316; }
.dialog-kind.closed { background: #e8f7ef; color: #10a154; }

.lead-kind {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.lead-kind.new { background: #e7f5ff; color: #0284c7; }
.lead-kind.work { background: #f0ecff; color: var(--violet); }
.lead-kind.success { background: #e8f7ef; color: #10a154; }
.lead-kind.failure { background: #ffe9ec; color: #e0243e; }

.deal-kind {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.deal-kind.new { background: #e7f5ff; color: #0284c7; }
.deal-kind.work { background: #f0ecff; color: var(--violet); }
.deal-kind.success { background: #e8f7ef; color: #10a154; }
.deal-kind.failure { background: #ffe9ec; color: #e0243e; }

.activity-kind {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.activity-kind.planned { background: #e8f7ef; color: #10a154; }
.activity-kind.overdue { background: #ffe9ec; color: #e0243e; }
.activity-kind.empty { background: #f0ecff; color: var(--violet); }

.task-kind {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.task-kind.open { background: #e7f5ff; color: #0284c7; }
.task-kind.overdue { background: #ffe9ec; color: #e0243e; }
.task-kind.done { background: #e8f7ef; color: #10a154; }
.task-kind.no-deadline { background: #fff2e5; color: #f97316; }

.call-page-detail-row a {
  color: var(--primary);
  font-weight: 740;
  text-decoration: none;
}

.call-number-link,
.dialog-title-link {
  appearance: none;
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-weight: 760;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.call-number-link:hover,
.dialog-title-link:hover {
  color: var(--blue-strong);
  text-decoration: underline;
}

.call-source {
  color: #4e596b;
  font-size: 11px;
  line-height: 1.35;
}

.call-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.call-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

button.call-action-link {
  cursor: pointer;
}

.call-action-link:hover {
  border-color: rgba(91, 91, 214, .35);
  background: #f7f7ff;
}

/* Контур24 visual layer */
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(107, 183, 255, .18), transparent 32%),
    linear-gradient(180deg, #f1fbff 0%, #f7fcff 42%, #f5fbff 100%);
  color: var(--text);
}

.topbar {
  grid-template-columns: auto 1fr;
  min-height: 58px;
  border-bottom: 1px solid rgba(47, 128, 237, .12);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 24px rgba(16, 32, 43, .035);
}

.brand {
  color: var(--text);
}

.brand-mark {
  color: var(--aqua);
}

.brand em {
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 184, 168, .14), rgba(107, 183, 255, .18));
  color: var(--blue-strong);
}

.topnav button,
.top-actions button,
.select-field,
.section-toggle,
.toggle-field,
.call-page-back,
.pipeline-toggle,
.call-action-link {
  border-radius: var(--radius-md);
}

.topnav button.active {
  background: linear-gradient(135deg, rgba(24, 184, 168, .14), rgba(107, 183, 255, .2));
  color: var(--blue-strong);
}

.top-actions button,
.select-field,
.section-toggle,
.toggle-field,
.pipeline-toggle {
  border-color: rgba(47, 128, 237, .14);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(16, 32, 43, .035);
}

.select-field {
  min-height: 44px;
  width: 260px;
  padding: 0 14px;
}

.select-field select {
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.select-field select option {
  font-size: 15px;
  color: var(--text);
}

.select-field > .icon {
  width: 15px;
  height: 15px;
  color: var(--blue-strong);
}

.section-menu {
  border-color: rgba(47, 128, 237, .14);
  box-shadow: 0 18px 36px rgba(16, 32, 43, .12);
}

.analyze-button,
.access-banner button,
.access-scope-pill {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--aqua), var(--blue-strong));
  box-shadow: 0 12px 24px rgba(47, 128, 237, .18);
}

.kpi-card,
.access-banner,
.profile-summary,
.table-shell,
.call-summary-details,
.call-page-summary div,
.dialog-page-employee,
.lead-page-employee,
.deal-page-employee,
.activity-page-employee,
.task-page-employee,
.dialog-page-detail-standalone,
.lead-page-detail-standalone,
.deal-page-detail-standalone,
.activity-page-detail-standalone,
.task-page-detail-standalone {
  border: 1px solid rgba(47, 128, 237, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.call-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 14px;
}

.call-filter button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(47, 128, 237, .14);
  border-radius: 17px;
  background: rgba(255, 255, 255, .94);
  color: #667085;
  font-size: 13px;
  font-weight: 680;
}

.call-filter button.active,
.call-filter button:hover {
  border-color: rgba(24, 184, 168, .36);
  background: linear-gradient(135deg, rgba(24, 184, 168, .12), rgba(107, 183, 255, .16));
  color: var(--blue-strong);
}

.call-crm-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(47, 128, 237, .16);
  border-radius: 13px;
  background: rgba(47, 128, 237, .06);
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.call-crm-link:hover {
  border-color: rgba(47, 128, 237, .32);
  background: rgba(47, 128, 237, .1);
}

.kpi-card {
  padding: 24px 26px;
}

.kpi-card i {
  top: 22px;
  right: 24px;
  opacity: .95;
}

.kpi-card i .icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}

.kpi-card span,
.section-title p,
.call-page-head p,
.kpi-card small {
  color: var(--muted);
}

.kpi-card strong,
.profile-main h1,
.call-page-head h1,
.section-title h1,
.main-number {
  color: var(--text);
}

.accent-pink i,
.accent-violet i,
.accent-blue i {
  color: var(--blue-strong);
}

.accent-green i {
  color: var(--aqua);
}

.calls-kpi-card:hover,
.calls-kpi-card:focus-visible,
.calls-kpi-card[aria-expanded="true"],
.dialogs-kpi-card:hover,
.dialogs-kpi-card:focus-visible,
.dialogs-kpi-card[aria-expanded="true"],
.leads-kpi-card:hover,
.leads-kpi-card:focus-visible,
.leads-kpi-card[aria-expanded="true"],
.deals-kpi-card:hover,
.deals-kpi-card:focus-visible,
.deals-kpi-card[aria-expanded="true"],
.activities-kpi-card:hover,
.activities-kpi-card:focus-visible,
.activities-kpi-card[aria-expanded="true"],
.tasks-kpi-card:hover,
.tasks-kpi-card:focus-visible,
.tasks-kpi-card[aria-expanded="true"] {
  border-color: rgba(24, 184, 168, .32);
  box-shadow: 0 14px 30px rgba(24, 184, 168, .1);
}

.calls-kpi-card[aria-expanded="true"]::after,
.dialogs-kpi-card[aria-expanded="true"]::after,
.leads-kpi-card[aria-expanded="true"]::after,
.deals-kpi-card[aria-expanded="true"]::after,
.activities-kpi-card[aria-expanded="true"]::after,
.tasks-kpi-card[aria-expanded="true"]::after,
.call-page-back:hover,
.lead-title-link:hover,
.deal-title-link:hover,
.activity-title-link:hover,
.task-title-link:hover {
  color: var(--blue-strong);
}

.call-stat.duration strong,
.dialog-stat.new strong,
.lead-stat.in-work strong,
.deal-stat.in-work strong,
.activity-stat.no-planned strong {
  color: var(--blue-strong);
}

.call-stat.incoming strong,
.dialog-stat.closed strong,
.task-stat.done strong,
.activity-stat.planned strong,
.lead-stat.closed strong,
.deal-stat.closed strong {
  color: var(--aqua);
}

.pipeline-menu {
  border-color: rgba(47, 128, 237, .14);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 36px rgba(16, 32, 43, .12);
}

.pipeline-option:hover,
.pipeline-option:has(input:checked),
.pill.good,
.call-kind.incoming,
.dialog-kind.closed,
.lead-kind.success,
.deal-kind.success,
.activity-kind.planned,
.task-kind.done {
  background: #e8fbf8;
  color: #0f9589;
}

.call-kind.outgoing,
.lead-kind.new,
.deal-kind.new,
.task-kind.open {
  background: #eaf5ff;
  color: var(--blue-strong);
}

.lead-kind.work,
.deal-kind.work,
.activity-kind.empty,
.call-kind.all {
  background: #eef7ff;
  color: var(--blue-strong);
}

.call-page-detail-row,
.dialog-page-detail-row,
.lead-page-detail-row,
.deal-page-detail-row,
.activity-page-detail-row,
.task-page-detail-row {
  border-color: rgba(47, 128, 237, .1);
  border-radius: 18px;
}

.avatar,
.profile-avatar {
  background: linear-gradient(135deg, rgba(24, 184, 168, .16), rgba(107, 183, 255, .22));
  color: var(--blue-strong);
}

/* Proportional compact controls */
.topbar {
  min-height: 52px;
}

.topnav {
  gap: 12px;
}

.topnav button {
  min-height: 34px;
  padding: 0 15px;
  gap: 10px;
  overflow: visible;
  font-size: 13px;
  line-height: 1;
}

.topnav .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: .95;
  stroke-width: 1.55;
}

.brand-mark {
  width: 16px;
  height: 16px;
  stroke-width: 1.55;
}

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

.brand-logo {
  width: 180px;
  height: 74px;
}

.support-widget {
  justify-self: end;
}

.support-widget .question-button {
  min-height: 34px;
  padding: 0 16px;
  gap: 10px;
  border-radius: 17px;
  font-size: 13px;
  line-height: 1;
}

.filters {
  gap: 12px;
  margin-bottom: 20px;
}

.select-field,
.section-picker {
  width: 240px;
}

.filters .select-field:has(#departmentFilter) {
  width: 300px;
}

.select-field {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 18px;
}

.select-field select {
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  padding-right: 18px;
}

.select-field select option {
  font-size: 13px;
}

.select-field > .icon {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  flex: 0 0 14px;
}

.section-toggle {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 18px;
}

.section-toggle span {
  display: none;
}

.section-toggle strong {
  min-width: 0;
  padding-right: 22px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
}

.section-toggle::after {
  position: absolute;
  right: 14px;
  width: 7px;
  height: 7px;
}

.section-menu {
  top: calc(100% + 6px);
  padding: 7px;
}

.section-option {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.pipeline-dropdown {
  max-width: 100%;
  margin-top: 18px;
  padding-bottom: 8px;
}

.pipeline-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(16, 32, 43, .035);
}

.pipeline-toggle span {
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .06em;
}

.pipeline-toggle strong {
  font-size: 13px;
  font-weight: 620;
  line-height: 1.18;
}

.pipeline-toggle::after {
  width: 7px;
  height: 7px;
}

.pipeline-menu {
  top: calc(100% + 6px);
  border-radius: 18px;
}

.kpi-card i {
  top: 20px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: rgba(107, 183, 255, .12);
  line-height: 1;
  opacity: 1;
  overflow: visible;
}

.kpi-card i .icon {
  width: 18px;
  height: 18px;
  overflow: visible;
  stroke-width: 1.75;
}

.kpi-card .kpi-help {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: rgba(107, 183, 255, .14);
  color: var(--blue-strong);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.kpi-card .kpi-help::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  box-sizing: border-box;
  width: 280px;
  max-width: calc(100vw - 32px);
  padding: 11px 13px;
  border: 1px solid rgba(107, 183, 255, .34);
  border-radius: 14px;
  background: #fff;
  color: #10202b;
  box-shadow: 0 14px 28px rgba(16, 32, 43, .14);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .14s ease, transform .14s ease;
}

.kpi-card .kpi-help:hover::after,
.kpi-card .kpi-help:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.kpi-card .kpi-help:focus-visible {
  outline: 2px solid rgba(47, 128, 237, .34);
  outline-offset: 3px;
}

.kpi-card .kpi-title {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 0;
  margin-bottom: 12px;
  color: #566173;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.kpi-card .kpi-drag-handle {
  display: inline-grid;
  position: absolute;
  top: 50%;
  left: -18px;
  grid-template-columns: repeat(2, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 3px;
  width: 15px;
  height: 15px;
  margin: 0;
  color: #9aa7b8;
  font-size: 0;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0;
  text-transform: none;
  transform: translateY(-50%);
  cursor: grab;
}

.kpi-drag-handle::before,
.kpi-drag-handle::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 6px currentColor, 0 12px currentColor;
}

.kpi-drag-handle:hover,
.kpi-drag-handle:focus-visible {
  color: var(--blue-strong);
}

.kpi-drag-handle:active {
  cursor: grabbing;
}

.kpi-card > strong {
  cursor: pointer;
}

.kpi-card [data-kpi-detail-target] {
  cursor: pointer;
}

.kpi-card .kpi-detail-link {
  position: absolute !important;
  top: auto !important;
  right: 18px !important;
  bottom: 14px !important;
  left: 18px !important;
  display: block;
  max-width: none !important;
  margin: 0 !important;
  color: #9aa3b3;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  outline: 0;
  text-align: left !important;
}

.kpi-card .kpi-detail-link:hover,
.kpi-card .kpi-detail-link:focus-visible {
  color: var(--blue-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kpi-card [data-kpi-detail-target]:focus-visible {
  border-radius: 10px;
  outline: 2px solid rgba(47, 128, 237, .34);
  outline-offset: 3px;
}

.kpi-card.dragging {
  opacity: .62;
  transform: scale(.985);
  box-shadow: 0 20px 42px rgba(16, 32, 43, .12);
}

.kpi-card .pipeline-dropdown,
.kpi-card button,
.kpi-card input {
  cursor: auto;
}

.kpi-card,
.calls-kpi-card,
.dialogs-kpi-card,
.leads-kpi-card,
.deals-kpi-card,
.activities-kpi-card,
.tasks-kpi-card {
  cursor: default;
}

.kpi-card > strong {
  cursor: pointer;
}

.kpi-card .kpi-drag-handle {
  cursor: grab;
}

.kpi-card .kpi-drag-handle:active {
  cursor: grabbing;
}

.filters .pipeline-dropdown {
  width: 290px;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.filters .pipeline-toggle {
  min-height: 44px;
  border-color: rgba(47, 128, 237, .14);
  background: rgba(255, 255, 255, .92);
}

.filters .pipeline-menu {
  top: calc(100% + 8px);
  z-index: 40;
}

.deals-kpi-card,
.activities-kpi-card {
  min-height: 178px;
}

@media (max-width: 720px) {
  .filters .pipeline-dropdown {
    width: 100%;
  }
}

.accent-green i {
  background: rgba(24, 184, 168, .12);
}

.accent-orange i {
  background: rgba(255, 151, 0, .12);
}

.admin-access-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(47, 128, 237, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.admin-access-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #8a9aab;
}

.admin-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.admin-department-picker {
  position: relative;
  min-width: 290px;
}

.admin-row-department-picker {
  min-width: 240px;
}

.admin-department-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 46px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.admin-department-toggle span {
  color: #7b8aa0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-department-toggle strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-department-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  width: min(420px, 92vw);
  max-height: 340px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(16, 32, 43, .12);
}

.admin-department-picker[data-open="true"] .admin-department-menu {
  display: grid;
  gap: 8px;
}

.admin-department-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 12px;
  color: #43566a;
  font-weight: 560;
}

.admin-department-option:hover,
.admin-department-option:has(input:checked) {
  background: #eef8ff;
  color: var(--primary);
}

.admin-department-option-all {
  border-bottom: 1px solid #edf3f8;
  border-radius: 12px 12px 4px 4px;
}

.admin-mode-group {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 18px;
  background: #eef8ff;
}

.admin-mode-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 14px;
  color: #43566a;
  font-weight: 750;
}

.admin-mode-group label:has(input:checked) {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(47, 128, 237, .08);
}

.admin-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #6b7b88;
}

.admin-access-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #43566a;
  font-weight: 750;
}

.admin-user-list {
  display: grid;
  gap: 8px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr) minmax(240px, 320px);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #e8f1f8;
  border-radius: 18px;
  background: #fff;
}

.admin-user-select {
  display: grid;
  place-items: center;
}

.admin-user-select input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.admin-user-row span {
  display: grid;
  gap: 3px;
}

.admin-user-row strong {
  color: var(--text);
  font-weight: 650;
}

.admin-user-row small {
  color: #7b8aa0;
}

.admin-access-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef8ff;
  color: var(--blue-strong);
  font-size: 12px;
}

.admin-access-pill.all {
  background: var(--primary-soft);
  color: var(--primary);
}

.accent-violet i,
.accent-blue i,
.accent-pink i {
  background: rgba(47, 128, 237, .1);
}

@media (max-width: 1100px) {
  .call-page-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .call-page-employee-main {
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(80px, .7fr));
  }
}

@media (max-width: 720px) {
  .call-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .call-page-summary,
  .call-page-employee-main,
  .call-page-detail-row,
  .dialog-page-employee-main,
  .dialog-page-detail-row,
  .lead-page-employee-main,
  .lead-page-detail-row,
  .deal-page-employee-main,
  .deal-page-detail-row,
  .activity-page-employee-main,
  .activity-page-detail-row,
  .task-page-employee-main,
  .task-page-detail-row {
    grid-template-columns: 1fr 1fr;
  }

  .call-page-person,
  .dialog-page-person,
  .lead-page-person {
    grid-column: 1 / -1;
  }

  .deal-page-person {
    grid-column: 1 / -1;
  }

  .activity-page-person {
    grid-column: 1 / -1;
  }

  .task-page-person {
    grid-column: 1 / -1;
  }
}

/* Final employee table alignment. */
.employees-section table {
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.employees-section .table-shell {
  overflow: visible;
}

.employees-section .employee-sticky-panel {
  position: sticky;
  top: 64px;
  z-index: 10;
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 24px rgba(16, 32, 43, .055);
  backdrop-filter: blur(10px);
}

.employees-section .employee-column-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.employees-section .employee-column-scroll::-webkit-scrollbar {
  display: none;
}

.employees-section .employee-head-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.employees-section .employee-head-table thead {
  display: table-header-group;
}

.employees-section .table-scroll thead {
  display: none;
}

.employees-section .employee-head-table th {
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  background: #fff;
  vertical-align: middle;
}

.employees-section tbody td {
  height: 78px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
}

.employees-section th:first-child,
.employees-section td:first-child {
  width: 310px;
  padding-left: 28px;
}

.employees-section th:nth-child(2),
.employees-section td:nth-child(2) {
  width: 250px;
}

.employees-section th:nth-child(n + 3),
.employees-section td:nth-child(n + 3) {
  width: 115px;
}

.employees-section td.numeric {
  padding-top: 14px;
  vertical-align: top;
  text-align: center;
}

.employees-section .call-cell-button {
  justify-items: center;
  min-width: 0;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  text-align: center;
}

.employees-section .main-number,
.employees-section .sub-metric {
  text-align: center;
}

.employees-section .sub-metric {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  line-height: 1.25;
}

.employees-section .sub-metric > span {
  white-space: nowrap;
}

.employees-section .table-sort-button {
  width: 100%;
  min-height: 44px;
  align-items: center;
  line-height: 1;
}

.employees-section .table-sort-button .icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
  flex: 0 0 15px;
}

.employees-section th:first-child .table-sort-button,
.employees-section th:nth-child(2) .table-sort-button {
  justify-content: flex-start;
}

.employees-section th.numeric .table-sort-button {
  justify-content: center;
}

.employees-section .employee-cell {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  height: 78px;
  min-width: 0;
}

.employees-section .employee-cell > div {
  min-width: 0;
}

.employees-section .avatar {
  width: 36px;
  height: 36px;
  font-size: 11px;
  justify-self: start;
}

.employees-section .avatar img {
  border-radius: 50%;
}

.employees-section .employee-cell strong,
.employees-section .employee-cell span {
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.employees-section tbody tr {
  cursor: pointer;
}

.employees-section tbody tr:hover td {
  background: rgba(47, 128, 237, .035);
}

.attention-section {
  margin-top: 18px;
  margin-bottom: 30px;
  padding-bottom: 2px;
}

.attention-page {
  display: grid;
  gap: 14px;
}

.attention-list {
  display: grid;
  gap: 8px;
}

.attention-list:empty {
  display: none;
}

.attention-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 7px;
  margin-bottom: 10px;
  border: 1px solid rgba(191, 226, 245, .95);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
}

.attention-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  min-width: 136px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 14px/1 var(--font);
  cursor: pointer;
}

.attention-tab strong {
  color: var(--blue);
  font-size: 14px;
}

.attention-tab.active {
  background: linear-gradient(135deg, rgba(38, 198, 218, .22), rgba(47, 128, 237, .16));
  color: var(--blue);
}

.attention-section .attention-tabs {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0;
}

.attention-section + .employees-section {
  margin-top: 4px;
}

.attention-page-tabs {
  width: fit-content;
  max-width: 100%;
}

.attention-card,
.attention-empty {
  border: 1px solid rgba(191, 226, 245, .95);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(24, 74, 110, .055);
}

.attention-card {
  display: grid;
  grid-template-columns: minmax(245px, 1.1fr) minmax(190px, .8fr) minmax(340px, 1.5fr);
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
}

.attention-card-attention {
  border-color: rgba(255, 178, 178, .9);
}

.attention-card-check {
  border-color: rgba(126, 213, 220, .95);
}

.attention-person {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.attention-person .avatar {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.attention-person span,
.attention-status,
.attention-status span {
  min-width: 0;
}

.attention-person strong,
.attention-status strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.attention-person small,
.attention-status span,
.attention-empty span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.attention-signals {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.attention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(47, 128, 237, .16);
  border-radius: 999px;
  background: rgba(238, 248, 255, .9);
  color: var(--ink);
  font: inherit;
}

.attention-person:hover strong {
  color: var(--blue);
}

.attention-chip strong {
  color: var(--blue);
  font-size: 14px;
  line-height: 1;
}

.attention-chip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.attention-chip-calm {
  color: var(--muted);
  font-size: 12px;
}

.attention-empty {
  padding: 14px 16px;
}

.attention-empty strong {
  display: block;
  color: var(--teal);
  font-size: 16px;
}

@media (max-width: 980px) {
  .attention-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .attention-signals {
    justify-content: flex-start;
  }
}

.employee-page {
  display: grid;
  gap: 18px;
}

.employee-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(47, 128, 237, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.employee-detail-person {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.employee-detail-person .avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  font-size: 13px;
}

.employee-detail-person .avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.employee-detail-person h1 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
}

.employee-detail-person p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

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

.employee-detail-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 20px 22px;
  border: 1px solid rgba(47, 128, 237, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.employee-detail-card:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 128, 237, .24);
}

.employee-detail-card span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.employee-detail-card strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.employee-detail-card small {
  color: #7b8496;
  font-size: 13px;
  line-height: 1.4;
}

.employee-metric-summary {
  margin-bottom: 0;
}

.employee-metric-detail-grid {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(47, 128, 237, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .employee-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Header support block */
.topbar {
  display: flex;
  gap: 10px;
  min-height: 64px;
  overflow: visible;
}

.brand-logo {
  display: block;
  width: 148px;
  height: 54px;
  object-fit: contain;
  border-radius: 0;
}

.brand {
  flex: 0 0 154px;
  min-width: 0;
  overflow: hidden;
}

.topnav {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  gap: 4px;
  overflow: visible;
  overflow-y: visible;
  flex-wrap: nowrap;
}

.topnav button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 16px;
  gap: 7px;
  color: #667285;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.topnav button.active {
  background: linear-gradient(135deg, rgba(24, 184, 168, .14), rgba(107, 183, 255, .22));
  color: var(--blue-strong);
  box-shadow: inset 0 0 0 1px rgba(107, 183, 255, .14);
}

.topnav button .icon {
  width: 15px;
  height: 15px;
}

#overviewNavButton {
  margin-left: 0;
}

.support-widget {
  flex: 0 0 auto;
  margin-left: 2px;
}

.support-widget .question-button {
  min-width: 146px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .topbar {
    flex-wrap: wrap;
    overflow: visible;
  }

  .topnav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .support-widget {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .brand {
    flex-basis: 142px;
  }

  .brand-logo {
    width: 136px;
    height: 56px;
    border-radius: 0;
  }

  .support-widget .question-button {
    min-width: 0;
    padding: 0 12px;
    font-size: 12px;
  }
}

/* Compact KPI cards and detail-page sorting */
.kpi-card,
.calls-kpi-card,
.dialogs-kpi-card,
.leads-kpi-card,
.deals-kpi-card,
.activities-kpi-card,
.tasks-kpi-card {
  min-height: 156px;
}

.kpi-card {
  padding-top: 20px;
  padding-bottom: 18px;
}

.calls-kpi-card > strong,
.dialogs-kpi-card > strong,
.leads-kpi-card > strong,
.deals-kpi-card > strong,
.activities-kpi-card > strong,
.tasks-kpi-card > strong {
  margin-bottom: 9px;
  font-size: 32px;
}

.call-breakdown,
.dialog-breakdown,
.lead-breakdown,
.deal-breakdown,
.activity-breakdown,
.task-breakdown {
  gap: 4px;
  padding-bottom: 10px;
}

.call-stat,
.dialog-stat,
.activity-stat,
.task-stat,
.lead-stat,
.deal-stat {
  min-height: 22px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.detail-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.detail-sort button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(47, 128, 237, .14);
  border-radius: 17px;
  background: rgba(255, 255, 255, .94);
  color: #667085;
  font-size: 13px;
  font-weight: 680;
}

.detail-sort button.active,
.detail-sort button:hover {
  border-color: rgba(24, 184, 168, .36);
  background: linear-gradient(135deg, rgba(24, 184, 168, .12), rgba(107, 183, 255, .16));
  color: var(--blue-strong);
}

.activity-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 4px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, .08);
}

.activity-mode-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 680;
}

.activity-mode-switch button.active,
.activity-mode-switch button:hover {
  background: linear-gradient(135deg, rgba(24, 184, 168, .2), rgba(47, 128, 237, .18));
  color: var(--blue-strong);
}

.activity-mode-switch-kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 260px;
  margin: 0 0 8px;
  padding: 3px;
  border-radius: 16px;
}

.activity-mode-switch-kpi button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.dialog-page-employee-main .detail-metric-active,
.call-page-employee-main .detail-metric-active,
.lead-page-employee-main .detail-metric-active,
.deal-page-employee-main .detail-metric-active,
.activity-page-employee-main .detail-metric-active,
.task-page-employee-main .detail-metric-active {
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(24, 184, 168, .1), rgba(107, 183, 255, .14));
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, .1);
}

.dialog-page-employee-main .detail-metric-active b,
.call-page-employee-main .detail-metric-active b,
.lead-page-employee-main .detail-metric-active b,
.deal-page-employee-main .detail-metric-active b,
.activity-page-employee-main .detail-metric-active b,
.task-page-employee-main .detail-metric-active b {
  color: var(--blue-strong);
}

.dialog-page-employee-main,
.lead-page-employee-main {
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(110px, .8fr));
}

.deal-page-employee-main {
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(110px, .8fr));
}

.deal-page-detail-head,
.deal-page-detail-row {
  grid-template-columns: minmax(230px, 2.1fr) minmax(130px, .9fr) minmax(150px, 1fr) minmax(94px, .7fr);
}

.deal-page-employee-main .deal-page-person {
  grid-column: 1;
  justify-self: stretch;
  text-align: left;
}
