:root {
  --crm-filter-surface: #f5f7fa;
  --crm-table-header-surface: #e9edf3;
  color: #15171a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6f8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html,
body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; background: #f5f6f8; }
a { color: #e50012; }
button, input, select, textarea { font: inherit; }
button { letter-spacing: 0; }
input, select, textarea {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #d7dbe0;
  border-radius: 6px;
  background: white;
  color: #242a31;
  font-size: 13px;
}
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: 13px; font-weight: 600; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 4; width: 96px;
  padding: 14px 10px; background: linear-gradient(180deg, #101923, #121821); color: white;
}
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 7px; background: #e60012; color: white;
  font: 34px/1 Georgia, serif;
}
.nav-icon {
  display: grid; place-items: center; width: 76px; min-height: 52px;
  margin-top: 14px; padding: 6px 4px; color: white; text-decoration: none;
  border-radius: 7px;
}
.nav-icon span { font-size: 18px; font-weight: 950; line-height: 1; }
.nav-icon small {
  margin-top: 5px;
  color: #d8dee6;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.nav-icon.active { background: rgba(255,255,255,.08); }
.topbar {
  position: fixed; inset: 0 0 auto 96px; height: 64px; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid #e1e3e6; background: white;
}
.topbar-title { display: flex; align-items: center; gap: 18px; }
.back-link { color: #171b20; font-size: 24px; text-decoration: none; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu form { margin: 0; }
.notification-dot { color: #111; font-size: 22px; position: relative; }
.notification-dot::after {
  content: "";
  position: absolute; right: -1px; top: 5px;
  width: 6px; height: 6px; border-radius: 999px; background: #e60012;
}
.user-avatar {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 999px; background: #e60012; color: white; font-weight: 900;
}
.user-name { display: grid; gap: 1px; font-weight: 800; }
.user-name small { color: #626b77; font-size: 11px; font-weight: 600; }
.link-button { padding: 0; border: 0; background: transparent; color: #e50012; cursor: pointer; }
.workspace { margin-left: 96px; padding: 82px 18px 26px; }
.test-subnav,
.employee-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #dde1e6;
  border-radius: 7px;
  background: white;
}
.test-subnav a,
.employee-filter a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 5px;
  color: #59626e;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.test-subnav a.active,
.employee-filter a.active {
  background: #fbeaec;
  color: #c50010;
}
.inn-search {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dde1e6;
  border-radius: 8px;
  background: white;
}
.inn-search > label {
  flex: 0 0 auto;
  color: #4f5864;
  font-size: 12px;
  font-weight: 800;
}
.inn-search-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(520px, 100%);
}
.inn-search-controls input {
  min-width: 0;
  min-height: 38px;
  margin: 0;
}
.inn-search-controls button {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #e60012;
  border-radius: 6px;
  background: #e60012;
  color: white;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.inn-search-controls a {
  padding: 8px 6px;
  color: #68717c;
  font-size: 12px;
  font-weight: 750;
}
.panel, .company-header, .dashboard-hero, .metric-grid article {
  border: 1px solid #e0e3e7; border-radius: 8px; background: white;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .04);
}
.company-header, .dashboard-hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px; margin-bottom: 14px;
}
h1 { margin: 0 0 7px; font-size: 23px; font-weight: 700; letter-spacing: 0; }
h2 { margin: 0 0 18px; font-size: 16px; font-weight: 700; letter-spacing: 0; }
h3 { margin: 20px 0 7px; font-size: 14px; letter-spacing: 0; }
p { line-height: 1.5; }
.primary {
  min-height: 44px; padding: 11px 18px; border: 0; border-radius: 6px;
  background: #e60012; color: white; font-weight: 700; cursor: pointer;
}
.secondary {
  min-height: 44px; padding: 11px 18px; border: 1px solid #cfd5dc; border-radius: 6px;
  background: white; color: #242a31; font-weight: 700; cursor: pointer;
}
.button-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: fit-content; text-decoration: none;
}
.plain-action {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #5b6470; font-weight: 700; text-decoration: none;
}
.actions-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-pill { padding: 8px 12px; border-radius: 6px; background: #fbe6e8; color: #b0000e; }
.partner-card { display: block; }

.manager-read-only-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 16px 20px;
  border-left: 4px solid #e90012;
}

.manager-read-only-banner div {
  display: grid;
  gap: 4px;
}

.manager-read-only-banner span {
  color: #687180;
  font-size: 14px;
}
.partner-hero { padding: 24px 26px; }
.hero-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.hero-topline p { margin: 0; color: #3f4853; font-size: 13px; font-weight: 400; }
.hero-actions { display: flex; gap: 10px; align-items: center; }
.kebab-button {
  width: 38px; min-height: 38px; border: 1px solid #d9dde3; border-radius: 6px;
  background: white; font-weight: 900; font-size: 20px;
}
.hero-summary {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr .85fr .95fr .95fr;
  gap: 22px;
  border-top: 1px solid #e5e8ec;
  padding-top: 16px;
}
.hero-summary div { min-width: 0; border-right: 1px solid #dfe3e8; padding-right: 18px; }
.hero-summary div:last-child { border-right: 0; }
.hero-summary span {
  display: block;
  margin-bottom: 8px;
  color: #505965;
  font-size: 12px;
  font-weight: 700;
}
.hero-summary strong {
  display: block;
  color: #2f3741;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}
.ghost-button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid #d9dde3;
  border-radius: 6px;
  background: white;
  font-weight: 800;
}
.panel.funnel-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.funnel-step, .funnel-closed {
  --funnel-stage-color: #6f7781;
  --funnel-stage-text: #555e69;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 9px 8px 5px;
  text-align: center;
}
.funnel-step::before, .funnel-closed::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--funnel-stage-color);
  content: "";
}
.funnel-step strong, .funnel-closed strong {
  color: var(--funnel-stage-text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}
.funnel-step + .funnel-step,
.funnel-step + .funnel-closed { border-left: 1px solid #edf0f3; }
.funnel-stage-new { --funnel-stage-color: #d8a329; --funnel-stage-text: #8b6708; }
.funnel-stage-contact_established { --funnel-stage-color: #397dcc; --funnel-stage-text: #2665a9; }
.funnel-stage-interest { --funnel-stage-color: #21a36b; --funnel-stage-text: #16764c; }
.funnel-stage-development { --funnel-stage-color: #de762b; --funnel-stage-text: #a95114; }
.funnel-stage-contract { --funnel-stage-color: #8067b7; --funnel-stage-text: #62489b; }
.funnel-stage-sales { --funnel-stage-color: #168b90; --funnel-stage-text: #0b6c70; }
.funnel-stage-closed { --funnel-stage-color: #c43f4d; --funnel-stage-text: #9e2633; }
.funnel-step.completed { opacity: .78; }
.funnel-step.upcoming { opacity: .42; }
.funnel-step.current,
.funnel-closed.active {
  background: #f7f8fa;
  opacity: 1;
}
.funnel-step.current::before,
.funnel-closed.active::before { height: 6px; }
.funnel-step.current strong,
.funnel-closed.active strong {
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.funnel-step.muted { opacity: .22; }
.card-layout {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(320px, 1fr) minmax(380px, 1.15fr);
  gap: 14px;
}
.panel { padding: 20px; margin-bottom: 14px; }
.panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: #fff1f2;
  color: #e60012;
}
.section-icon img {
  width: 18px;
  height: 18px;
  display: block;
}
dl { display: grid; grid-template-columns: 42% 58%; margin: 0; }
dt, dd { padding: 10px 0; margin: 0; border-bottom: 1px solid #eceef0; }
dt { color: #5e6570; font-size: 12px; }
dd { color: #2f3741; font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.lpr-panel { min-height: 430px; }
.extra-contacts { margin-top: 18px; }
.disclosure {
  padding-top: 12px;
  border-top: 1px solid #e3e6ea;
}
.disclosure summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  color: #e60012;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before {
  content: "▶";
  color: #e60012;
  font-size: 10px;
}
.disclosure[open] summary::before { content: "▼"; }
.extra-contacts summary { padding: 2px 0 8px; }
.extra-contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;
  gap: 0 12px;
  margin-top: 12px;
  font-size: 12px;
}
.extra-contact-grid > * {
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid #eceef0;
  overflow-wrap: anywhere;
}
.extra-contact-grid > span { color: #5e6570; font-weight: 800; }
.extra-contact-grid strong,
.extra-contact-grid b { font-size: 12px; }
.organization-contact-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.organization-contact-groups section { min-width: 0; }
.organization-contact-groups h3 {
  margin: 0 0 8px;
  color: #59626e;
  font-size: 12px;
}
.organization-contact-groups a,
.organization-contact-groups span {
  display: block;
  margin: 5px 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.company-subsection {
  min-width: 0;
  margin: 0 0 12px;
  padding: 7px 12px 4px;
  border: 1px solid #e0e4e9;
  border-radius: 6px;
  background: #fafbfc;
}
.company-subsection legend {
  padding: 0 6px;
  color: #59626e;
  font-size: 11px;
  font-weight: 800;
}
.company-name-value {
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
}
.company-name-value.is-long { font-size: 12px; }
.company-name-value.is-very-long { font-size: 11px; line-height: 1.4; }
.holding-evidence {
  margin: 5px 0 8px;
  color: #68717d;
  font-size: 11px;
}
.holding-members {
  margin: 0;
  padding: 0;
  list-style: none;
}
.holding-members li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 0;
  border-top: 1px solid #eceef0;
  overflow-wrap: anywhere;
}
.holding-members small { margin-left: auto; color: #68717d; }
.crm-head-company-badge {
  display: inline-grid;
  place-items: center;
  align-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1;
  vertical-align: middle;
}
.crm-head-company-badge img { width: 20px; height: 20px; }
.crm-tag-line .crm-head-company-badge { margin-left: 0; }
.crm-company-title-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
}
.crm-company-title-line .crm-head-company-badge {
  flex: 0 0 auto;
  margin-left: 0;
}
.crm-company-title-line > :not(.crm-head-company-badge) { min-width: 0; }
.crm-company-page-title h1 { margin: 5px 0 4px; }
.company-title {
  display: flex;
  align-items: center;
}
.section-edit-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #e0e4e9;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}
.section-edit-button img { width: 15px; height: 15px; }
.company-edit-panel {
  min-width: 0;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #f0c8cc;
  border-radius: 6px;
  background: #fffafb;
}
.company-edit-panel legend {
  padding: 0 6px;
  color: #a6000d;
  font-size: 11px;
  font-weight: 800;
}
.company-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.company-edit-grid label {
  min-width: 0;
  color: #59626e;
  font-size: 11px;
  font-weight: 800;
}
.company-edit-grid .wide { grid-column: 1 / -1; }
.company-edit-grid input,
.company-edit-grid select,
.company-edit-grid textarea {
  margin-top: 5px;
  font-size: 12px;
}
.company-edit-grid textarea { min-height: 78px; }
.company-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.company-edit-actions button {
  width: auto;
  min-width: 104px;
}
.metric-change { margin-left: 7px; color: #238548; font-size: 11px; }
.financial-subsection dd:has(.metric-change) { white-space: nowrap; }
.okved-list { margin: 12px 0 0; padding-left: 19px; }
.okved-list li {
  margin-bottom: 7px;
  color: #2f3741;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
.operations-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.operations-head h1 { margin: 0 0 3px; font-size: 22px; }
.operations-head p { margin: 0; color: #69717d; font-size: 12px; }
.sql-badge {
  padding: 7px 10px;
  border: 1px solid #b9ddc6;
  border-radius: 5px;
  background: #eef9f2;
  color: #18743a;
  font-size: 12px;
  font-weight: 700;
}
.operations-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  margin-bottom: 10px;
  border: 1px solid #dde1e6;
  border-radius: 6px;
  background: white;
}
.operations-summary article {
  min-width: 0;
  padding: 10px 13px;
  border-right: 1px solid #e7e9ec;
}
.operations-summary article:last-child { border-right: 0; }
.operations-summary span {
  display: block;
  min-height: 17px;
  color: #69717d;
  font-size: 10px;
  font-weight: 700;
}
.operations-summary strong { font-size: 19px; font-weight: 750; }
.operation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.management-workspace > * {
  width: min(1080px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}
.operation-actions form { min-width: 0; }
.operation-action {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  grid-template-rows: auto auto;
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #d9dde2;
  border-radius: 6px;
  background: white;
  color: #171b20;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.operation-action > span {
  grid-row: 1 / 3;
  align-self: center;
  color: #e60012;
  font-size: 20px;
}
.operation-action b { align-self: end; font-size: 12px; }
.operation-action small { color: #707985; font-size: 9px; line-height: 1.3; }
.operation-action:hover { border-color: #e60012; }
.operation-action.primary { border-color: #e60012; }
.operation-action:disabled {
  border-color: #e3e6e9;
  background: #f3f4f6;
  color: #8b929b;
  cursor: not-allowed;
}
.operation-lock-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid #f0d79a;
  border-radius: 6px;
  background: #fff9e8;
  color: #735300;
  box-sizing: border-box;
  font-size: 11px;
}
.operation-lock-notice span { color: #786c50; }
.active-operation { margin-bottom: 14px; padding: 14px; }
.active-operation header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.active-operation header span {
  color: #69717d;
  font-size: 11px;
  font-weight: 700;
}
.active-operation h2 { margin: 3px 0 0; font-size: 16px; }
.active-operation header > strong { color: #e60012; font-size: 20px; }
.operation-progress {
  height: 7px;
  margin: 11px 0 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #eceef1;
}
.operation-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #e60012;
  transition: width .25s ease;
}
.operation-detail {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  font-size: 11px;
  color: #59626e;
  font-size: 12px;
}
.operation-detail p { margin: 0; }
.operation-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 5px;
  background: #fdebed;
  color: #b00011;
  font-weight: 700;
}
.source-monitor {
  margin-top: 18px;
  border-top: 1px solid #e5e8ec;
  padding-top: 15px;
}
.source-monitor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.source-monitor-head h3 { margin: 0; font-size: 14px; }
.source-monitor-head span { color: #7a828d; font-size: 10px; }
.source-monitor-list { display: grid; gap: 6px; }
.source-monitor-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(8, minmax(72px, .65fr)) minmax(105px, .75fr);
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 9px 12px;
  border: 1px solid #e1e5e9;
  border-left: 4px solid #aeb5bd;
  border-radius: 6px;
  background: #fafbfc;
}
.source-monitor-row.running { border-left-color: #1e9a50; background: #f2faf5; }
.source-monitor-row.paused { border-left-color: #e0a100; background: #fff9e9; }
.source-monitor-row.limited { border-left-color: #d48b00; background: #fff8e6; }
.source-monitor-row.waiting,
.source-monitor-row.queued { border-left-color: #5f7fa7; background: #f4f7fb; }
.source-monitor-row.failed { border-left-color: #c82132; background: #fff3f4; }
.source-monitor-row.succeeded { border-left-color: #60a878; }
.source-monitor-name b { display: block; font-size: 12px; }
.source-monitor-name span {
  display: block;
  margin-top: 2px;
  color: #68727d;
  font-size: 10px;
  font-weight: 700;
}
.source-monitor-row > div > small {
  display: block;
  margin-bottom: 2px;
  color: #7a828d;
  font-size: 9px;
}
.source-monitor-row > div > strong { font-size: 11px; }
.source-monitor-note { color: #69727d; font-size: 10px; text-align: right; }
.source-health-registry { margin-bottom: 16px; padding: 18px; overflow: hidden; }
.source-health-registry h2 { margin: 0; font-size: 16px; }
.source-health-table {
  display: grid;
  min-width: 900px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  overflow: hidden;
}
.source-health-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) minmax(145px, .8fr) minmax(140px, .8fr) minmax(180px, 1fr) minmax(110px, .6fr) minmax(120px, .6fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 9px 12px;
  border-bottom: 1px solid #e8ebee;
  background: #fff;
  font-size: 11px;
}
.source-health-row:last-child { border-bottom: 0; }
.source-health-row > span:first-child b,
.source-health-row > span:first-child small { display: block; }
.source-health-row > span:first-child small { margin-top: 2px; color: #737b85; }
.source-health-error small {
  display: block;
  max-width: 220px;
  margin-top: 2px;
  overflow: hidden;
  color: #737b85;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-health-header {
  min-height: 36px;
  background: #f5f6f8;
  color: #69727d;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.source-health-state {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef1f4;
  color: #59626e;
  font-style: normal;
  font-weight: 800;
}
.source-health-state.active { background: #e7f5eb; color: #17743a; }
.source-health-state.degraded { background: #fff3d6; color: #946400; }
.source-health-state.unavailable { background: #fde8eb; color: #b00020; }
.source-health-state.disabled { background: #eceff2; color: #68727d; }
.operations-grid {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
  gap: 16px;
}
.operations-grid .panel { padding: 18px; }
.operations-grid h2 { margin: 0 0 14px; font-size: 16px; }
.block-counts p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #eef0f2;
}
.block-counts span { color: #59626e; font-size: 12px; }
.block-counts strong { font-size: 13px; }
.operation-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.download-latest { color: #e60012; font-size: 11px; font-weight: 700; }
.operation-history > div {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 110px auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f2;
  font-size: 11px;
}
.operation-history span { color: #737b85; }
.operation-history em { font-style: normal; font-weight: 700; }
.operation-history em.succeeded { color: #17813d; }
.operation-history em.failed { color: #b00011; }
.operation-history em.running, .operation-history em.queued { color: #9b6a00; }
.operation-history a { color: #e60012; font-weight: 700; }
@media (max-width: 1100px) {
  .operations-summary { grid-template-columns: repeat(3, 1fr); }
  .operations-summary article:nth-child(3) { border-right: 0; }
  .operation-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .operations-head { align-items: flex-start; flex-direction: column; }
  .operations-summary { grid-template-columns: repeat(2, 1fr); }
  .operations-summary article:nth-child(3) { border-right: 1px solid #e7e9ec; }
  .operations-summary article:nth-child(even) { border-right: 0; }
  .operation-actions, .operations-grid { grid-template-columns: 1fr; }
  .operation-detail { grid-template-columns: 1fr; gap: 5px; }
  .source-monitor-head { align-items: flex-start; flex-direction: column; }
  .source-monitor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .source-monitor-name,
  .source-monitor-note { grid-column: 1 / -1; text-align: left; }
  .source-health-registry { overflow-x: auto; }
  .operation-history > div { grid-template-columns: 100px 1fr; }
}

/* Project-owned workflow management */
.project-admin-head { align-items: flex-end; }
.project-admin-head h1 { margin-top: 10px; }
.project-admin-list { border-top: 1px solid #d9e0e8; }
.project-admin-list > a { display: grid; grid-template-columns: minmax(260px, 1fr) 170px 150px 24px; gap: 20px; align-items: center; min-height: 76px; padding: 14px 18px; color: #202938; text-decoration: none; border-bottom: 1px solid #d9e0e8; background: #fff; }
.project-admin-list > a:hover { background: #f7f9fc; }
.project-admin-list div { display: grid; gap: 3px; }
.project-admin-list span { color: #68758a; font-size: 13px; }
.project-admin-list i { font-size: 26px; color: #66758a; font-style: normal; }
.project-clone-control { position: relative; }
.project-clone-control > form { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); width: 320px; padding: 16px; border: 1px solid #ccd6e3; background: #fff; box-shadow: 0 12px 30px rgb(27 39 56 / 14%); }
.project-clone-control form label { display: grid; gap: 5px; margin-bottom: 10px; color: #536075; font-size: 13px; font-weight: 700; }
.project-clone-control form input { min-height: 42px; padding: 8px 10px; border: 1px solid #c8d3e1; }
.project-clone-control form button { min-height: 42px; width: 100%; border: 1px solid #b9dcc8; color: #126a3d; background: #ddf3e6; font-weight: 800; }
.project-settings-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; margin: 0 0 24px; padding: 5px; border: 1px solid #d5dee9; background: #fff; }
.project-settings-tabs a { padding: 9px 14px; color: #354258; text-decoration: none; font-size: 14px; font-weight: 750; }
.project-settings-tabs a:hover { background: #edf3fb; }
.project-settings-section { scroll-margin-top: 76px; margin-bottom: 30px; border-top: 1px solid #d6dee8; }
.project-settings-section > header { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 0 12px; }
.project-settings-section h2 { margin: 0; font-size: 22px; }
.project-settings-section header p { margin: 5px 0 0; color: #6c788b; font-size: 14px; }
.project-dictionary-add { display: flex; gap: 6px; }
.project-dictionary-add input { width: 250px; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e2; }
.project-dictionary-add button { width: 40px; min-height: 40px; border: 1px solid #b8d9c6; color: #13703f; background: #ddf3e6; font-size: 23px; }
.project-dictionary-list { border-top: 1px solid #dce3ec; }
.project-dictionary-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; border-bottom: 1px solid #dce3ec; background: #fff; }
.project-dictionary-row.is-disabled { background: #f4f5f7; opacity: .72; }
.project-dictionary-edit { display: grid; grid-template-columns: 36px 36px minmax(220px, 1fr) 130px 42px; gap: 6px; align-items: center; padding: 8px 6px 8px 0; }
.project-dictionary-edit > button, .project-delete-item button { min-height: 36px; border: 0; background: transparent; color: #66758a; font-size: 18px; }
.project-dictionary-edit > button:hover { background: #edf2f8; }
.project-dictionary-edit > input[name="label"] { min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e2; color: #202938; background: #fff; font-weight: 700; }
.project-active-toggle { display: flex; gap: 7px; align-items: center; color: #526077; font-size: 13px; }
.project-save-item { color: #13703f !important; }
.project-delete-item { padding-right: 4px; }
.project-delete-item button { width: 38px; color: #d0182b; }
.project-delete-item button:disabled { color: #aeb7c5; }
.project-profile-form { border-top: 1px solid #dce3ec; }
.project-profile-list fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px; margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid #dce3ec; }
.project-profile-list legend { width: 100%; margin-bottom: 8px; color: #273246; font-weight: 850; }
.project-profile-list label { display: flex; gap: 9px; align-items: flex-start; padding: 7px 8px; }
.project-profile-list label:hover { background: #f3f6fa; }
.project-profile-list label span { display: grid; gap: 2px; }
.project-profile-list small { color: #758196; }
.project-profile-form footer { display: flex; justify-content: flex-end; padding-top: 14px; }
.project-profile-form footer button { min-height: 42px; padding: 0 18px; border: 1px solid #b7dbc6; color: #126a3d; background: #ddf3e6; font-weight: 800; }
.activity-comment.is-system-hidden { display: none !important; }
@media (max-width: 800px) {
  .project-admin-list > a { grid-template-columns: 1fr 24px; }
  .project-admin-list > a div:not(:first-child) { display: none; }
  .project-settings-tabs { overflow-x: auto; }
  .project-settings-tabs a { white-space: nowrap; }
  .project-settings-section > header { align-items: flex-start; flex-direction: column; }
  .project-dictionary-add, .project-dictionary-add input { width: 100%; }
  .project-dictionary-edit { grid-template-columns: 32px 32px minmax(0, 1fr) 40px; }
  .project-active-toggle { grid-column: 3; }
  .project-profile-list fieldset { grid-template-columns: 1fr; }
}
.data-issue-panel textarea { min-height: 80px; }
.data-issue-save {
  min-height: 34px;
  margin-top: 8px;
  padding: 7px 11px;
  border: 1px solid #a9d7bb;
  border-radius: 6px;
  background: #dff3e7;
  color: #126a3d;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.data-issue-save:hover { background: #d1ecdc; }
.data-issue-save:disabled { cursor: not-allowed; opacity: .45; }
.activity-previous { display: inline-flex; align-items: center; gap: 7px; }
.activity-previous img { width: 16px; height: 16px; }
.work-card-actions button {
  min-height: 36px;
  padding: 8px 13px;
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}
.work-card-actions .activity-previous {
  border-color: #e2c76e;
  background: #fff7d7;
  color: #6f5a18;
}
.work-card-actions .activity-save {
  border-color: #abd7bb;
  background: #ddf3e6;
  color: #126a3d;
}
.work-card-actions .activity-next {
  border-color: #e60012;
  background: #e60012;
  color: #fff;
}
.work-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.work-title h2 { margin-bottom: 0; }
.help-link {
  border: 0;
  background: transparent;
  color: #235aa6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin-left: 5px;
  border: 1px solid #aeb8c5;
  border-radius: 999px;
  background: white;
  color: #506174;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}
.field-help-popover {
  position: absolute;
  z-index: 15;
  width: min(390px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 35px rgba(18, 28, 40, .18);
  color: #222932;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: pre-line;
}
.status-help-list {
  display: grid;
  gap: 11px;
}
.status-help-list p { margin: 0; }
.status-help-list strong {
  display: block;
  margin-bottom: 2px;
  color: #171b20;
  font-size: 13px;
  font-weight: 800;
}
.status-help-list span {
  display: block;
  color: #59626e;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}
.work-column > label, .work-column > .split { margin-bottom: 14px; }
.work-subsection > label,
.work-subsection > .split { margin-bottom: 12px; }
.work-subsection > :last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.date-postpone-row {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: end;
}
.date-postpone-row > label { min-width: 0; }
.date-postpone-row > label:last-child {
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}
.date-postpone-row > label:last-child input {
  display: block;
  width: 100%;
}
.hint, .muted { color: #737b86; font-size: 12px; }
.edit-phone { margin-top: 18px; }
.edit-phone > label {
  display: block;
  margin-bottom: 7px;
  color: #242a31;
  font-size: 13px;
  font-weight: 800;
}
.phone-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.phone-editor input {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.phone-save {
  min-width: 86px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #e60012;
  border-radius: 6px;
  background: #e60012;
  color: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.phone-edit {
  min-width: 86px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  background: white;
  color: #242a31;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.phone-save:hover { background: #c90010; }
.phone-save:disabled,
.access-save:disabled,
.activity-save:disabled,
.activity-next.is-disabled {
  cursor: not-allowed;
  opacity: .45;
}
.phone-message {
  min-height: 18px;
  margin: 6px 0 0;
  color: #737b86;
  font-size: 12px;
  font-weight: 700;
}
.phone-message.success { color: #138a3d; }
.phone-message.error { color: #b00011; }
.status-consistency-message {
  min-height: 18px;
  margin: -4px 0 8px;
  color: #b00011;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.activity-save-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: #737b86;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.activity-save-message.success { color: #138a3d; }
.activity-save-message.error { color: #b00011; }
.skip-card-row {
  margin-top: 10px;
}
.activity-skip {
  min-height: 34px;
  padding: 7px 12px;
  border-color: #e8d89b;
  background: #fff8dc;
  color: #5f5328;
  font-size: 12px;
  font-weight: 700;
}
.activity-skip:hover {
  border-color: #d8c36e;
  background: #fff3c4;
}
.activity-skip:disabled {
  cursor: wait;
  opacity: .65;
}
.card-completion-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  margin-top: 18px;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  background: #f7faf8;
}
.card-completion-panel[hidden] { display: none; }
.card-completion-panel p {
  margin: 0;
  color: #28313d;
  line-height: 1.5;
}
.card-completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.card-completion-actions button { min-height: 42px; }
.bpm-access-fields { margin-bottom: 8px !important; }
#bpm-status-field {
  position: relative;
  width: min(100%, 260px);
}
#bpm-status-select {
  appearance: none;
  padding-right: 38px;
}
#bpm-status-field::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #59626e;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
#bpm-status-field:has(select:disabled)::after { opacity: .55; }
.work-subsection {
  min-width: 0;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #e0e4e9;
  border-radius: 6px;
  background: #fafbfc;
}
.bpm-work-block { position: relative; }
.bpm-edit-button {
  position: absolute;
  top: 5px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e0e4e9;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}
.bpm-edit-button img { width: 15px; height: 15px; }
.bpm-gate-message {
  margin: -3px 0 14px;
  padding: 10px 12px;
  border: 1px solid #f0c8cc;
  border-radius: 6px;
  background: #fff5f6;
  color: #a6000d;
  font-size: 12px;
  font-weight: 700;
}
.activity-workflow.is-locked {
  opacity: .48;
  pointer-events: none;
  user-select: none;
}
.activity-workflow > label { margin-bottom: 14px; }
.work-subsection:disabled { color: inherit; }
.work-subsection legend {
  padding: 0 7px;
  color: #505965;
  font-size: 11px;
  font-weight: 800;
}
.add-next-step-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 34px;
  margin-top: 4px;
  padding: 7px 12px;
  border: 1px solid #df2438;
  border-radius: 6px;
  background: white;
  color: #c40016;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.add-next-step-button:hover { background: #fff2f4; }
.next-step-workflow {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.next-step-workflow[hidden] { display: none; }
.next-step-workflow > .work-subsection,
.additional-next-steps > .additional-next-step { margin: 0; }
.additional-next-steps { display: grid; gap: 12px; }
.next-step-workflow > .add-next-step-button { justify-self: start; margin: 0; }
.additional-next-step {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #dfe5eb;
  border-radius: 6px;
  background: #f8fafc;
}
.remove-next-step-button {
  position: absolute;
  top: 7px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e60012;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}
.remove-next-step-button:hover { color: #a9000d; }
.server-date {
  color: #3d4651;
  background: #f7f8fa;
  cursor: default;
}
.bpm-access-action {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 8px;
  align-items: start;
  margin: -2px 0 14px;
}
.bpm-result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}
.bpm-result.granted { color: #238548; }
.bpm-result.denied { color: #b85d65; }
.bpm-status-save {
  grid-column: 1;
  grid-row: 1;
  min-width: 118px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d8b3b7;
  border-radius: 6px;
  background: white;
  color: #d70012;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.bpm-status-save:hover {
  border-color: #e60012;
  background: #fff5f6;
}
.bpm-status-save:disabled {
  cursor: default;
  opacity: .45;
}
.bpm-access-action p {
  margin: 0;
  color: #69717d;
  font-size: 12px;
  font-weight: 700;
}
#bpm-access-message {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  text-align: center;
}
.bpm-status-owner {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.bpm-status-owner span {
  color: #7a828d;
  font-size: 11px;
  font-weight: 600;
}
.bpm-status-owner strong {
  color: #59626e;
  font-size: 12px;
  font-weight: 800;
}
.bpm-access-action p.success { color: #138a3d; }
.bpm-access-action p.error { color: #b00011; }
.dashboard-hero form {
  display: grid;
  gap: 9px;
}
.dashboard-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}
.access-page-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}
.access-page-head h1 { margin: 0 0 5px; font-size: 28px; }
.access-page-head p { margin: 0; color: #69717d; }
.access-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.access-metric {
  display: block;
  padding: 16px;
  border: 1px solid #e0e3e7;
  border-radius: 7px;
  background: white;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.access-metric:hover { border-color: #b8bec6; box-shadow: 0 4px 12px rgba(25, 32, 40, .08); transform: translateY(-1px); }
.access-metric:focus-visible { outline: 3px solid rgba(238, 0, 20, .22); outline-offset: 2px; }
.access-metric.active { border-color: #ee0014; box-shadow: inset 0 -3px 0 #ee0014; }
.access-metrics span { display: block; color: #69717d; font-size: 12px; }
.access-metrics strong { display: block; margin-top: 6px; font-size: 28px; }
.access-metric-granted strong { color: #138a3d; }
.access-metric-denied strong, .access-metric-overdue strong { color: #b00011; }
.access-draft-panel { margin-bottom: 18px; }
.access-draft-panel h2 { margin: 0 0 5px; }
.access-card-list {
  display: grid;
  gap: 14px;
}
.access-card {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(25, 32, 40, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.access-card:hover {
  border-color: #cbd1d8;
  box-shadow: 0 5px 16px rgba(25, 32, 40, .08);
}
.activity-card,
.access-card {
  --record-card-collapsed-height: 108px;
}
.record-card-expandable { overflow: hidden; }
.activity-card.is-collapsible:not(.is-expanded) .record-card-expandable,
.access-card.is-collapsible:not(.is-expanded) .record-card-expandable {
  max-height: var(--record-card-collapsed-height);
}
.record-card-toggle {
  display: grid;
  width: 100%;
  height: 32px;
  place-items: center;
  border: 0;
  border-top: 1px solid rgba(93, 102, 113, .13);
  background: rgba(255, 255, 255, .46);
  color: #66707c;
  cursor: pointer;
}
.record-card-toggle[hidden] { display: none; }
.record-card-toggle:hover { background: rgba(255, 255, 255, .78); }
.record-card-toggle:focus-visible {
  outline: 2px solid #e60012;
  outline-offset: -3px;
}
.record-card-toggle-symbol {
  display: block;
  font-size: 22px;
  line-height: 1;
  transition: transform .16s ease;
}
.is-expanded .record-card-toggle-symbol { transform: rotate(180deg); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.access-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px 15px;
  border-bottom: 1px solid rgba(93, 102, 113, .13);
}
.access-card-company {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.access-card-company > strong,
.access-card-company .activity-company-link {
  width: fit-content;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.3;
}
.access-card-company > span {
  color: #68717c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.access-card-fields {
  display: grid;
  grid-template-columns: minmax(110px, .7fr) minmax(140px, .9fr) minmax(145px, .9fr) 120px 120px minmax(210px, 1.2fr);
  gap: 0;
  padding: 0 20px;
}
.access-draft-card-fields {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.access-card-field {
  min-width: 0;
  padding: 16px 18px 18px 0;
}
.access-card-field + .access-card-field {
  padding-left: 18px;
  border-left: 1px solid rgba(93, 102, 113, .13);
}
.access-card-field > span {
  display: block;
  margin-bottom: 7px;
  color: #68717c;
  font-size: 11px;
  font-weight: 750;
}
.access-card-field > strong,
.access-card-field > time {
  color: #20262d;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}
.access-card-field > time { font-variant-numeric: tabular-nums; }
.access-card.access-date-overdue { background: #fff3f4; border-color: #f2d7da; }
.access-card.access-date-today { background: #fff9e7; border-color: #eadfb9; }
.access-card.access-date-future { background: #fff; border-color: #dfe3e8; }
.access-draft-card { background: #fff9e7; border-color: #eadfb9; }
.access-card-note {
  margin: 0;
  padding: 11px 20px;
  border-top: 1px solid rgba(93, 102, 113, .13);
  color: #7c5a00;
  font-size: 12px;
  font-weight: 750;
}
.access-status {
  width: fit-content;
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 5px;
  background: #fff4d8;
  color: #9b6500;
  font-weight: 900;
}
.access-status.granted { background: #e8f7ed; color: #138a3d; }
.access-status.denied { background: #fdebed; color: #b00011; }
.access-resolution { display: flex; gap: 7px; }
.access-resolution-form { display: flex; gap: 8px; margin: 0; }
.access-resolution-form select { min-width: 112px; margin: 0; min-height: 36px; }
.access-resolution button,
.access-save {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.access-save {
  border: 1px solid #e60012;
  background: #e60012;
  color: white;
}
.access-yes {
  border: 1px solid #138a3d;
  background: #138a3d;
  color: white;
}
.access-no {
  border: 1px solid #d4d8dd;
  background: white;
  color: #b00011;
}
.access-warning, .access-waiting {
  margin: 0 20px 16px;
  padding: 10px 12px;
  border-radius: 5px;
  font-weight: 800;
}
.access-warning { background: #fdebed; color: #b00011; }
.access-waiting { background: #eef6ff; color: #1f5c9c; }
.access-empty { padding: 48px; text-align: center; }
.access-empty h2 { margin: 0 0 8px; }
.access-empty p { margin: 0; color: #69717d; }
@media (max-width: 1280px) {
  .access-card-fields { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .access-card-field:nth-child(n + 4) {
    border-top: 1px solid rgba(93, 102, 113, .13);
  }
  .access-card-field:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }
  .access-draft-card-fields { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .access-draft-card-fields .access-card-field:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid rgba(93, 102, 113, .13);
    border-left: 0;
  }
}
@media (max-width: 700px) {
  .inn-search { align-items: stretch; flex-direction: column; gap: 8px; }
  .inn-search-controls { width: 100%; flex-wrap: wrap; }
  .inn-search-controls input { flex: 1 1 180px; }
  .access-card-list { gap: 10px; }
  .activity-card,
  .access-card { --record-card-collapsed-height: 174px; }
  .access-card-header { align-items: flex-start; padding: 15px 16px 13px; }
  .access-card-fields,
  .access-draft-card-fields {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .access-card-field,
  .access-card-field + .access-card-field,
  .access-card-field:nth-child(n + 3),
  .access-draft-card-fields .access-card-field:nth-child(3) {
    padding: 13px 0;
    border-top: 1px solid rgba(93, 102, 113, .13);
    border-left: 0;
  }
  .access-card-field:first-child { border-top: 0; }
  .access-resolution-form { align-items: stretch; flex-direction: column; }
  .access-warning, .access-waiting { margin: 0 16px 14px; }
  .access-card-note { padding: 11px 16px; }
}
.statistics-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.statistics-head p {
  margin: 0;
  color: #69717d;
  font-size: 13px;
}
.statistics-period {
  display: grid;
  gap: 7px;
  min-width: min(100%, 610px);
}
.statistics-period-fields {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(128px, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.statistics-period label {
  display: grid;
  gap: 4px;
  color: #69717d;
  font-size: 11px;
  font-weight: 700;
}
.statistics-period input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d8dde4;
  border-radius: 5px;
  background: #fff;
  color: #20262e;
  font: inherit;
  font-size: 13px;
}
.statistics-segment-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 8px;
}
.statistics-multi-filter {
  position: relative;
  min-width: 0;
}
.statistics-multi-filter summary {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #d8dde4;
  border-radius: 5px;
  background: #fff;
  color: #20262e;
  cursor: pointer;
  list-style: none;
}
.statistics-multi-filter summary::-webkit-details-marker { display: none; }
.statistics-multi-filter summary::after {
  position: absolute;
  top: 17px;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #737c88;
  border-bottom: 2px solid #737c88;
  content: "";
  transform: rotate(45deg);
}
.statistics-multi-filter[open] summary::after {
  top: 21px;
  transform: rotate(225deg);
}
.statistics-multi-filter summary span {
  color: #69717d;
  font-size: 10px;
  font-weight: 700;
}
.statistics-multi-filter summary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.statistics-filter-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 290px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d8dde4;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 38, 48, 0.14);
}
.statistics-filter-menu label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 4px;
  color: #252b33;
  cursor: pointer;
  font-size: 12px;
}
.statistics-filter-menu label:hover { background: #f4f6f8; }
.statistics-filter-menu label[hidden] { display: none; }
.statistics-filter-menu input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #e60012;
}
.statistics-filter-menu .statistics-filter-all {
  margin-bottom: 4px;
  border-bottom: 1px solid #eceff3;
  border-radius: 0;
  font-weight: 750;
}
.statistics-period-submit {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #e60012;
  border-radius: 5px;
  background: #e60012;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.statistics-period-presets {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}
.statistics-period-presets a {
  color: #59626e;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.statistics-period-presets a:hover { color: #e60012; }
.statistics-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 0;
  margin-bottom: 16px;
  padding: 18px 20px;
}
.statistics-summary article {
  min-width: 0;
  padding: 0 18px;
  border-right: 1px solid #e3e6ea;
}
.statistics-summary article:first-child { padding-left: 0; }
.statistics-summary article:last-child { padding-right: 0; border-right: 0; }
.statistics-summary span {
  display: block;
  min-height: 32px;
  color: #69717d;
  font-size: 11px;
  font-weight: 700;
}
.statistics-summary strong {
  display: block;
  color: #d90012;
  font-size: 23px;
  font-weight: 750;
}
.statistics-summary strong.positive { color: #138a3d; }
.statistics-layout {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.65fr);
  gap: 16px;
  align-items: start;
}
.department-funnel { padding: 20px; }
.department-funnel header,
.employee-stat-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.department-funnel header h2,
.employee-stat-card header h2 { margin: 0; }
.department-funnel header p {
  margin: 0;
  color: #69717d;
  font-size: 12px;
}
.funnel-stat-head,
.funnel-stat-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 70px 55px;
  gap: 12px;
  align-items: center;
}
.funnel-stat-head {
  margin-top: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #e6e9ed;
  color: #69717d;
  font-size: 11px;
  font-weight: 700;
}
.funnel-stat-row {
  position: relative;
  padding: 11px 0 15px;
  border-bottom: 1px solid #eef0f2;
  font-size: 12px;
}
.funnel-stat-row strong { font-weight: 650; }
.funnel-stat-row i {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f2f4;
}
.funnel-stat-row i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #e60012;
}
.employee-statistics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.employee-stat-card { overflow: hidden; padding: 0; }
.employee-stat-card header {
  padding: 14px 16px;
  background: #e60012;
  color: white;
}
.employee-stat-card header h2 {
  font-size: 16px;
  font-weight: 700;
}
.employee-stat-card header span {
  font-size: 11px;
  font-weight: 700;
}
.employee-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e9ebee;
}
.employee-metrics div {
  min-width: 0;
  padding: 13px 14px;
  background: #fafbfc;
}
.employee-metrics span {
  display: block;
  min-height: 28px;
  color: #69717d;
  font-size: 10px;
  font-weight: 700;
}
.employee-metrics strong {
  color: #d90012;
  font-size: 20px;
  font-weight: 750;
}
.employee-metrics strong.positive { color: #138a3d; }
.employee-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 13px 16px 16px;
  color: #59626e;
  font-size: 11px;
}
.employee-statuses span { white-space: nowrap; }
.employee-statuses b { color: #171b20; }
.statistics-empty { padding: 34px; }
.work-funnel-panel { margin-bottom: 18px; padding: 22px; }
.work-funnel-panel > header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.work-funnel-panel h2 { margin: 0 0 4px; font-size: 18px; }
.work-funnel-panel header p { margin: 0; color: #69717d; font-size: 12px; }
.work-funnel-chart { display: grid; width: 100%; max-width: 920px; margin-inline: auto; gap: 8px; justify-items: center; }
.work-funnel-stage {
  appearance: none;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: var(--funnel-stage-width, 100%);
  min-height: 82px;
  padding: 15px 70px;
  clip-path: polygon(3% 0, 97% 0, 94% 100%, 6% 100%);
  border: 0;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.work-funnel-stage:hover { filter: brightness(.96); }
.work-funnel-stage:focus-visible { outline: 3px solid #151b24; outline-offset: 3px; }
.work-funnel-stage.stage-processed { background: #687485; }
.work-funnel-stage.stage-calls { background: #4f7fba; }
.work-funnel-stage.stage-interest { background: #2d7dd2; }
.work-funnel-stage.stage-agreement { background: #d59c3f; }
.work-funnel-stage.stage-pilot { background: #9c7fc1; }
.work-funnel-stage.stage-partner { background: #65a98c; }
.work-funnel-stage.stage-closed { background: #4f5968; }
.work-funnel-stage.stage-won { background: #2f865f; }
.work-funnel-stage.stage-lost { background: #b44752; }
.work-funnel-stage > span { font-size: 11px; font-weight: 800; opacity: .78; }
.work-funnel-stage h3 { margin: 0 0 3px; color: inherit; font-size: 16px; }
.work-funnel-stage p { margin: 0; color: inherit; font-size: 11px; opacity: .84; }
.work-funnel-stage p.work-funnel-terminal-metrics { margin-bottom: 2px; font-weight: 750; opacity: 1; }
.work-funnel-stage > strong { min-width: 84px; font-size: 25px; font-weight: 800; text-align: right; white-space: nowrap; }
.work-funnel-stage.is-terminal {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 82px;
  padding-inline: 32px;
}
.work-funnel-stage.is-terminal > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
}
.work-funnel-stage.is-terminal h3 { width: 100%; margin: 0; line-height: 1.15; }
.work-funnel-stage.is-terminal p {
  min-width: 0;
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.work-funnel-stage.is-terminal p.work-funnel-terminal-metrics { margin: 2px 0 0; }
.work-funnel-stage.is-zero-terminal {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  padding-inline: 24px;
}
.work-funnel-stage.is-zero-terminal > strong {
  min-width: 22px;
  font-size: 22px;
}
.work-funnel-stage.is-zero-terminal .work-funnel-terminal-metrics { display: none; }
.work-funnel-control-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(420px, 1.7fr) minmax(230px, 1fr) minmax(240px, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #e3e8ee;
}
.work-funnel-filterbar .activities-extra-filter[open] + .work-funnel-control-row { margin-top: 22px; padding-top: 18px; }
.work-funnel-filterbar .activities-extra-filter[open] { margin-bottom: 0; }
.work-funnel-segmented { min-width: 0; margin: 0; padding: 0; border: 0; }
.work-funnel-segmented legend { margin-bottom: 5px; color: #647083; font-size: 11px; font-weight: 750; }
.work-funnel-segmented label { display: inline-flex; margin: 0 4px 4px 0; cursor: pointer; }
.work-funnel-segmented input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.work-funnel-segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cfd8e4;
  border-radius: 5px;
  background: #fff;
  color: #4a5667;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}
.work-funnel-segmented input:checked + span { border-color: #8bb7ed; background: #edf5ff; color: #205f9f; box-shadow: inset 0 0 0 1px #8bb7ed; }
.work-funnel-segmented input:focus-visible + span { outline: 2px solid #1f6fca; outline-offset: 2px; }
.work-funnel-detail-dialog { width: min(1180px, calc(100vw - 32px)); max-height: min(780px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(18, 28, 41, .24); }
.work-funnel-detail-dialog::backdrop { background: rgba(25, 33, 45, .4); }
.work-funnel-detail-dialog > header,
.work-funnel-detail-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.work-funnel-detail-dialog > header { border-bottom: 1px solid #e0e6ed; }
.work-funnel-detail-dialog > footer { justify-content: flex-end; border-top: 1px solid #e0e6ed; }
.work-funnel-detail-dialog h2 { margin: 0; font-size: 18px; }
.work-funnel-detail-dialog header p { margin: 3px 0 0; color: #697589; font-size: 11px; }
.work-funnel-detail-dialog header > button { width: 32px; min-height: 32px; padding: 0; border: 0; background: transparent; color: #4f5d70; font-size: 26px; }
.work-funnel-detail-table-wrap { max-height: min(600px, calc(100vh - 180px)); overflow: auto; }
.work-funnel-detail-dialog table { width: 100%; border-collapse: collapse; font-size: 11px; }
.work-funnel-detail-dialog th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid #dce3eb; background: #f6f8fb; color: #617086; text-align: left; white-space: nowrap; }
.work-funnel-detail-dialog td { min-width: 130px; padding: 11px 12px; border-bottom: 1px solid #e6ebf1; color: #303b49; line-height: 1.45; white-space: pre-line; vertical-align: top; }
.work-funnel-detail-dialog td.is-company { min-width: 180px; font-weight: 750; }
.work-funnel-detail-dialog td.is-empty { padding: 34px; color: #6c7889; text-align: center; }
.work-funnel-detail-dialog footer a,
.work-funnel-detail-dialog footer button { min-height: 38px; padding: 9px 14px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #263344; font-size: 12px; font-weight: 750; text-decoration: none; }
.work-funnel-detail-dialog footer a { border-color: #b8d2f2; background: #edf5ff; color: #185d9e; }
@media (max-width: 1200px) {
  .statistics-summary { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .statistics-summary article:nth-child(3) { border-right: 0; }
  .statistics-layout { grid-template-columns: 1fr; }
  .work-funnel-chart { max-width: 820px; }
}
@media (max-width: 820px) {
  .statistics-head { align-items: stretch; flex-direction: column; }
  .statistics-period { min-width: 0; }
  .statistics-period-fields { grid-template-columns: 1fr 1fr; }
  .statistics-segment-fields { grid-template-columns: 1fr 1fr; }
  .statistics-period-submit { grid-column: 1 / -1; }
  .statistics-period-presets { justify-content: flex-start; }
  .statistics-summary { grid-template-columns: repeat(2, 1fr); }
  .statistics-summary article:nth-child(2n) { border-right: 0; }
  .employee-statistics { grid-template-columns: 1fr; }
  .work-funnel-chart { max-width: none; }
  .work-funnel-stage,
  .work-funnel-stage:nth-child(n) { width: 100%; padding: 14px 16px; clip-path: none; }
  .work-funnel-control-row { grid-template-columns: 1fr; }
  .work-funnel-detail-dialog { width: calc(100vw - 16px); }
}
.nextgen-statistics {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #dfe3e8;
}
.nextgen-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.nextgen-section-head h2 { margin: 2px 0 4px; font-size: 21px; }
.nextgen-section-head p { margin: 0; color: #69717d; font-size: 12px; }
.nextgen-eyebrow {
  color: #d90012;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.nextgen-shadow-state { display: grid; gap: 3px; text-align: right; }
.nextgen-shadow-state span { color: #727b87; font-size: 10px; font-weight: 700; }
.nextgen-shadow-state strong { font-size: 12px; }
.nextgen-filters {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(220px, 1fr) minmax(240px, 1.25fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
}
.nextgen-filters label { display: grid; gap: 5px; color: #68717d; font-size: 10px; font-weight: 750; }
.nextgen-filters select,
.nextgen-filters input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d7dce3;
  border-radius: 5px;
  background: #fff;
  color: #20262e;
  font: inherit;
  font-size: 12px;
}
.nextgen-filters button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #e60012;
  border-radius: 5px;
  background: #e60012;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.nextgen-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.nextgen-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
}
.nextgen-status > span { color: #626b77; font-size: 11px; font-weight: 750; }
.nextgen-status > strong { grid-row: 1 / span 2; grid-column: 2; color: #171b20; font-size: 25px; }
.nextgen-status > a,
.nextgen-status > small { color: #d90012; font-size: 10px; font-weight: 750; text-decoration: none; }
.nextgen-status > a:hover { text-decoration: underline; }
.nextgen-status-qualified { border-left: 4px solid #1a9548; }
.nextgen-status-needs_review { border-left: 4px solid #e2a000; }
.nextgen-status-excluded { border-left: 4px solid #d90012; }
.nextgen-status-total { border-left: 4px solid #5b6572; }
.nextgen-status-total > small { color: #727b87; }
.nextgen-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nextgen-reason-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nextgen-data-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
}
.nextgen-data-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid #e5e8ec;
  background: #f7f8fa;
}
.nextgen-data-section > header h3 { margin: 0; font-size: 13px; }
.nextgen-data-section > header span { color: #727b87; font-size: 10px; }
.nextgen-metric-list,
.nextgen-reason-list { display: grid; padding: 5px 15px; }
.nextgen-metric-list > div,
.nextgen-reason-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f2;
  color: #59626e;
  font-size: 11px;
}
.nextgen-metric-list > div:last-child,
.nextgen-reason-list > div:last-child { border-bottom: 0; }
.nextgen-metric-list strong,
.nextgen-reason-list strong { color: #171b20; white-space: nowrap; }
.nextgen-reason-list p { margin: 12px 0; color: #727b87; font-size: 11px; }
.nextgen-source-table-wrap { overflow-x: auto; }
.nextgen-source-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.nextgen-source-table th,
.nextgen-source-table td { padding: 9px 10px; border-bottom: 1px solid #edf0f2; text-align: right; white-space: nowrap; }
.nextgen-source-table th:first-child,
.nextgen-source-table td:first-child { text-align: left; }
.nextgen-source-table thead th { background: #fbfbfc; color: #69717d; font-weight: 750; }
@media (max-width: 1100px) {
  .nextgen-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nextgen-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nextgen-reason-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nextgen-section-head { align-items: flex-start; flex-direction: column; }
  .nextgen-shadow-state { text-align: left; }
  .nextgen-filters,
  .nextgen-status-grid,
  .nextgen-two-column { grid-template-columns: 1fr; }
}
.compact-panel { min-height: 150px; }
.company-copy {
  margin: 0;
  color: #2f3741;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}
.okved-details { margin-top: 12px; }
.okved-details summary {
  color: #e60012;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.okved-details p {
  margin: 10px 0 0;
  color: #242a31;
  font-size: 13px;
}
.access-draft-panel { margin-bottom: 18px; }
.access-draft-panel h2 { margin-bottom: 5px; }
.access-draft-note { margin: 0 0 12px; color: #6a7380; font-size: 13px; }
.access-draft-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) minmax(100px, .7fr) minmax(120px, .8fr) minmax(140px, .9fr) 130px minmax(210px, 1.2fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #e7eaee;
  font-size: 13px;
}
.access-draft-row div { display: grid; gap: 3px; }
.access-draft-row small { color: #737c88; }
.access-draft-status { color: #9a6813; font-weight: 700; }
.history-table {
  display: grid;
  grid-template-columns: 120px 100px 1.5fr 1.1fr 130px 80px 120px;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7eaee;
  color: #626b77;
  font-size: 12px;
  font-weight: 800;
}
.history-row {
  display: grid;
  grid-template-columns: 120px 100px 1.5fr 1.1fr 130px 80px 120px;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eceef0;
  font-size: 12px;
}
.history-row p { margin: 0; line-height: 1.35; }
.history-row span { color: #242a31; }
.history-row strong { font-size: 12px; }
.company-timeline {
  display: grid;
  gap: 18px;
}
.company-timeline-day {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.company-timeline-date {
  padding-top: 3px;
  color: #3f4b5c;
  font-size: 13px;
  font-weight: 700;
}
.company-timeline-date strong,
.company-timeline-date small { display: block; }
.company-timeline-date small {
  margin-top: 2px;
  color: #8792a2;
  font-size: 11px;
  font-weight: 500;
}
.company-timeline-events {
  display: grid;
  gap: 7px;
}
.company-timeline-event {
  position: relative;
  min-width: 0;
  padding: 10px 12px 10px 40px;
  border: 1px solid #e0e5eb;
  border-radius: 6px;
  background: #fff;
}
.timeline-event-icon {
  position: absolute;
  top: 11px;
  left: 11px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #edf0f3;
}
.timeline-event-icon img { width: 12px; height: 12px; }
.timeline-activity .timeline-event-icon,
.timeline-follow-up-completed .timeline-event-icon { background: #dff4e7; }
.timeline-follow-up-created .timeline-event-icon { background: #e5eefc; }
.timeline-pipeline .timeline-event-icon { background: #fff0d8; }
.timeline-edited .timeline-event-icon { background: #ece9fb; }
.company-timeline-content { min-width: 0; }
.company-timeline-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-bottom: 3px;
}
.company-timeline-meta strong { font-size: 13px; }
.company-timeline-meta time,
.company-timeline-meta span {
  color: #7c8796;
  font-size: 12px;
}
.company-timeline-meta time { font-variant-numeric: tabular-nums; }
.company-timeline-meta span { margin-left: auto; }
.company-timeline-event p {
  margin: 0;
  color: #263241;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.company-timeline-event .company-timeline-detail {
  margin-top: 4px;
  color: #576273;
  font-size: 12px;
}
.company-timeline-event .company-timeline-purpose { margin: 0 0 5px; font-weight: 750; }
.timeline-follow-up-created .company-timeline-description { font-size: 14px; }
.company-timeline-plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.company-timeline-plan-meta b {
  color: #303b49;
  font-weight: 700;
}
.timeline-follow-up-completed { border-left: 3px solid #20934a; }
.timeline-follow-up-not_completed { border-left: 3px solid #c23b46; }
.timeline-follow-up-rescheduled { border-left: 3px solid #d69b11; }
.timeline-bpm { border-left: 3px solid #2468b4; }
.company-timeline-detail-label,
.activity-history-detail {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef2f6;
  color: #647183;
  font-size: 10px;
  font-weight: 750;
}
.activity-group-card { --record-card-collapsed-height: 0px; }
.activity-step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.activity-step {
  display: grid;
  gap: 0;
  margin: 0;
  min-width: 0;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.activity-step + .activity-step {
  border-top: 0;
  border-left: 1px solid rgba(93, 102, 113, .16);
}
.activity-step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 13px 0 9px;
}
.activity-step-header > div {
  display: flex;
  align-items: baseline;
  flex: 1 1 150px;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
.activity-step-header > div > strong { font-size: 13px; }
.activity-step-number {
  color: #b00011;
  font-size: 12px;
  font-weight: 800;
}
.activity-step-outcome-select {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 230px;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  color: #5f6874;
  font-size: 11px;
  font-weight: 750;
}
.activity-step-outcome-select select {
  flex: 0 1 190px;
  width: 190px;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 34px 6px 10px;
  border-color: #cfd5dc;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, .82);
  font-size: 12px;
}
.activity-step-status {
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(89, 98, 111, .1);
  color: #59626f;
  font-size: 11px;
  font-weight: 800;
}
.activity-step-status-completed .activity-step-status { background: #dceee1; color: #176f37; }
.activity-step-status-not_completed .activity-step-status { background: #f9dfe2; color: #aa1825; }
.activity-step-fields {
  display: grid;
  grid-template-columns: minmax(120px, .6fr) minmax(120px, .65fr) minmax(280px, 2fr) minmax(170px, .85fr);
  padding-bottom: 14px;
}
.activity-step-fields > div {
  min-width: 0;
  padding: 8px 16px 10px 0;
}
.activity-step-fields > div + div {
  padding-left: 16px;
  border-left: 1px solid rgba(93, 102, 113, .13);
}
.activity-step-fields span {
  display: block;
  margin-bottom: 5px;
  color: #68717c;
  font-size: 11px;
  font-weight: 750;
}
.activity-step-fields strong,
.activity-step-fields time {
  color: #20262d;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.activity-step-fields time { font-variant-numeric: tabular-nums; }
.activity-step-description p {
  margin: 4px 0 0;
  color: #5f6874;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.activity-step-result {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(93, 102, 113, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
}
.activity-step-result[hidden] { display: none; }
.activity-step-result label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.activity-step-result fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 2px 0 0;
  padding: 12px;
  border: 1px solid #d9dee5;
  border-radius: 6px;
}
.activity-step-result legend { padding: 0 6px; color: #59626f; font-size: 12px; font-weight: 700; }
.activity-step-result textarea { min-height: 76px; resize: vertical; }
.activity-step-result button { justify-self: start; }
.follow-up-outcome-fields {
  display: grid;
  gap: 10px;
}
.follow-up-outcome-fields[hidden] { display: none; }
.activity-step-saved-result {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .58);
  color: #4f5864;
  font-size: 12px;
}
.activity-step-saved-result p { margin: 0; }
.activity-step-saved-result time { color: #707986; font-size: 11px; }
@media (max-width: 980px) {
  .company-timeline-day { grid-template-columns: 1fr; gap: 6px; }
  .company-timeline-day h3 { position: static; }
  .activity-step-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-step-fields > div:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid rgba(93, 102, 113, .13);
    border-left: 0;
  }
  .activity-step-fields > div:nth-child(4) { border-top: 1px solid rgba(93, 102, 113, .13); }
}
@media (max-width: 700px) {
  .activity-group-card { --record-card-collapsed-height: 520px; }
  .activity-step { padding: 0 16px; }
  .activity-step-header { align-items: flex-start; flex-direction: column; }
  .activity-step-outcome-select { width: 100%; justify-content: space-between; }
  .activity-step-outcome-select select { width: min(210px, 62%); }
  .activity-step-fields { grid-template-columns: 1fr; }
  .activity-step-fields > div,
  .activity-step-fields > div + div,
  .activity-step-fields > div:nth-child(3),
  .activity-step-fields > div:nth-child(4) {
    padding: 10px 0;
    border-top: 1px solid rgba(93, 102, 113, .13);
    border-left: 0;
  }
  .activity-step-fields > div:first-child { border-top: 0; }
}
.activity-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 18, 27, .62);
}
.activity-rules-card {
  position: relative;
  width: min(1240px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.activity-rules-card h2 {
  justify-content: center;
  margin: 0;
  color: #06123a;
  font-size: 42px;
  font-weight: 950;
  letter-spacing: 2px;
  text-align: center;
}
.modal-close {
  position: absolute; right: 18px; top: 14px;
  width: 34px; min-height: 34px; border: 0; border-radius: 999px;
  background: #f1f3f6; font-size: 24px; cursor: pointer;
}
.rules-subtitle {
  margin: 4px 0 18px;
  border-bottom: 1px solid #cfd7e2;
  padding-bottom: 10px;
  color: #526074;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}
.rules-subtitle strong { color: #075ecc; }
.rules-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.rules-top article {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px 14px;
  border-right: 1px solid #cfd7e2;
  min-height: 116px;
  align-items: center;
}
.rules-top article:last-child { border-right: 0; }
.rules-top span {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 999px; background: #00772c; color: white; font-size: 24px; font-weight: 950;
}
.rules-top article:nth-child(2) span { background: #075ecc; }
.rules-top article:nth-child(3) span { background: #6b34b7; }
.rules-top h3 { margin: 0; color: #08752f; font-size: 22px; font-weight: 950; }
.rules-top article:nth-child(2) h3 { color: #075ecc; }
.rules-top article:nth-child(3) h3 { color: #6b34b7; }
.rules-top p { grid-column: 2; margin: 0; font-weight: 800; line-height: 1.45; }
.rules-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}
.good-rules, .bad-rules {
  border: 1px solid #d5e3d8;
  border-radius: 8px;
  overflow: hidden;
}
.good-rules h3, .bad-rules h3 {
  margin: 0;
  padding: 12px 18px;
  color: white;
  background: #00772c;
  font-size: 22px;
  font-weight: 950;
}
.bad-rules {
  border-color: #ffd1d1;
}
.bad-rules h3 { background: #e60012; }
.rules-table {
  display: grid;
  grid-template-columns: 130px 1.1fr 1.1fr 100px;
  align-items: stretch;
}
.rules-table > * {
  margin: 0;
  padding: 12px;
  border-top: 1px solid #d9e6de;
  border-right: 1px solid #d9e6de;
  font-size: 13px;
  line-height: 1.45;
}
.rules-table b { color: #08752f; font-size: 12px; text-transform: uppercase; }
.rules-table span { color: #08752f; font-weight: 900; text-align: center; }
.bad-rules > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 22px 16px;
}
.bad-rules span {
  min-height: 82px;
  display: grid;
  place-items: center;
  border-right: 1px solid #ffd1d1;
  border-bottom: 1px solid #ffd1d1;
  color: #161b22;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}
.rules-check {
  margin: 10px 16px 18px;
  padding: 18px 22px;
  border: 1px solid #f3cf7d;
  border-radius: 8px;
  background: #fffaf0;
}
.rules-check strong { display: block; margin-bottom: 10px; font-size: 18px; }
.rules-check p { margin: 7px 0; color: #08752f; font-weight: 800; }
.rules-footer {
  display: grid;
  grid-template-columns: .8fr 1.4fr .8fr;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #b8d4f7;
  border-radius: 8px;
  color: #075ecc;
}
.rules-footer strong {
  font-size: 20px;
  font-weight: 950;
}
.rules-footer span {
  color: #111827;
  font-weight: 700;
}
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.metric-grid article { padding: 20px; }
.metric-grid span { display: block; color: #606873; }
.metric-grid strong { display: block; margin-top: 7px; font-size: 30px; }
.danger { color: #e60012; }
.planned-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.planned-grid h2 { display: flex; justify-content: space-between; }
.planned-row { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid #eceef0; }
.planned-row span { color: #69717d; font-size: 12px; }
.message { margin-bottom: 14px; padding: 12px 14px; border-radius: 6px; background: #e9f5ed; }
.message.success { color: #08752f; font-weight: 800; }
.message.error { background: #fdebed; color: #a4000d; }
.management-workspace > .manual-company-message { width: min(960px, 100%); }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-heading h1 { margin-bottom: 5px; }
.section-heading p { margin: 0; color: #69717d; }
.work-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 460px;
}
.work-ready span { color: #606873; font-weight: 700; }
.work-ready strong { color: #e60012; font-size: 32px; }
.employee-table-panel { padding: 0; overflow-x: auto; }
.employee-table {
  display: grid;
  min-width: 880px;
  align-items: center;
  gap: 14px;
}
.activity-card-list {
  display: grid;
  gap: 14px;
}
.activity-card {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(25, 32, 40, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.activity-card:hover {
  border-color: #cbd1d8;
  box-shadow: 0 5px 16px rgba(25, 32, 40, .08);
}
.activity-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px 15px;
  border-bottom: 1px solid rgba(93, 102, 113, .13);
}
.activity-card-company {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.activity-card-company > strong,
.activity-card-company .activity-company-link {
  width: fit-content;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.3;
}
.activity-card-company > span {
  color: #68717c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.activity-date-label {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}
.activity-card-fields {
  display: grid;
  grid-template-columns: minmax(120px, .65fr) minmax(280px, 2fr) minmax(170px, .85fr);
  gap: 0;
  padding: 0 20px;
}
.activity-card-fields.manager-activity-card-fields {
  grid-template-columns: minmax(120px, .65fr) minmax(280px, 2fr) minmax(170px, .85fr) minmax(150px, .8fr);
}
.activity-card-field {
  min-width: 0;
  padding: 16px 18px 18px 0;
}
.activity-card-field + .activity-card-field {
  padding-left: 18px;
  border-left: 1px solid rgba(93, 102, 113, .13);
}
.activity-card-field > span {
  display: block;
  margin-bottom: 7px;
  color: #68717c;
  font-size: 11px;
  font-weight: 750;
}
.activity-card-field > strong,
.activity-card-field > time {
  color: #20262d;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}
.activity-card-field > time { font-variant-numeric: tabular-nums; }
.activity-card-field > p {
  margin: 5px 0 0;
  color: #5f6874;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.activity-company-link {
  color: #171b20;
  font-weight: 800;
  text-decoration-color: #e60012;
  text-underline-offset: 3px;
}
.table-head {
  padding: 13px 18px;
  background: #f4f6f8;
  color: #59626e;
  font-size: 12px;
  font-weight: 900;
}
.table-row {
  padding: 16px 18px;
  border-top: 1px solid #e7eaee;
  font-size: 13px;
}
.table-row.activity-date-overdue { background: #fff0f1; }
.table-row.activity-date-today { background: #fff9df; }
.table-row.activity-date-future { background: #eef9f1; }
.table-row.activity-date-overdue:hover { background: #ffe7e9; }
.table-row.activity-date-today:hover { background: #fff4c8; }
.table-row.activity-date-future:hover { background: #e4f5e9; }
.table-row time { font-variant-numeric: tabular-nums; }
.activity-card.activity-date-overdue { background: #fff3f4; border-color: #f2d7da; }
.activity-card.activity-date-today { background: #fff9e7; border-color: #eadfb9; }
.activity-card.activity-date-future { background: #fff; border-color: #dfe3e8; }
.activity-card.activity-date-overdue .activity-date-label { background: #f9dfe2; color: #aa1825; }
.activity-card.activity-date-today .activity-date-label { background: #f5e8b8; color: #7c5a00; }
.activity-card.activity-date-future .activity-date-label { background: #eef0f3; color: #59626f; }
.table-empty { padding: 44px 18px; color: #69717d; text-align: center; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 800;
}
.pagination a { text-decoration: none; }
.bpm-backdrop {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}
.bpm-dialog {
  width: min(920px, 100%);
  min-height: 32vh;
  padding: 34px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 50px rgba(20, 24, 31, .16);
}
.bpm-flag {
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 6px;
  background: #e60012;
  color: white;
  font-weight: 800;
}
.bpm-company {
  margin: 0 0 22px;
  color: #56606b;
  font-weight: 700;
}
.bpm-dialog textarea {
  min-height: 230px;
  margin-bottom: 18px;
  font-family: inherit;
  line-height: 1.45;
}
.auth-page { display: grid; place-items: center; padding: 20px; }
.auth-panel { width: min(420px, 100%); padding: 32px; border: 1px solid #e0e3e7; border-radius: 8px; background: white; }
.auth-panel .brand-mark { margin-bottom: 22px; }
.stack { display: grid; gap: 18px; }

@media (max-width: 1050px) {
  .card-layout, .planned-grid, .hero-summary, .access-metrics { grid-template-columns: 1fr; }
  .hero-summary div { border-right: 0; border-bottom: 1px solid #eef0f3; padding-bottom: 12px; }
  .rules-top, .rules-main, .rules-footer { grid-template-columns: 1fr; }
  .rules-table { grid-template-columns: 1fr; }
  .bad-rules > div { grid-template-columns: repeat(2, 1fr); }
  .activity-card-fields,
  .activity-card-fields.manager-activity-card-fields {
    grid-template-columns: minmax(120px, .65fr) minmax(260px, 1.8fr);
  }
  .activity-card-field:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid rgba(93, 102, 113, .13);
    border-left: 0;
  }
  .activity-card-field:nth-child(4) {
    border-top: 1px solid rgba(93, 102, 113, .13);
  }
}

@media (max-width: 520px) {
  .date-postpone-row { grid-template-columns: 1fr; }
}

/* Search CRM uses the product red for primary actions on deal screens. */
.crm-mode .crm-deals-reference .button.primary,
.crm-mode .crm-deal-reference .button.primary {
  border-color: #e60012;
  background: #e60012;
  color: #fff;
}
.crm-mode .crm-deals-reference .button.primary:hover,
.crm-mode .crm-deal-reference .button.primary:hover {
  border-color: #c90010;
  background: #c90010;
}

/* Deal screens follow the approved TWork reference without changing other modules. */
.crm-deals-reference .button.primary,
.crm-deal-reference .button.primary {
  border-color: #e60012;
  background: #e60012;
  color: #fff;
}
.crm-deals-reference .button.primary:hover,
.crm-deal-reference .button.primary:hover {
  border-color: #c90010;
  background: #c90010;
}
.crm-reference-search {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e6eb;
}
.crm-reference-search .crm-search-field {
  flex: 0 1 420px;
  width: min(420px, 100%);
  min-height: 40px;
  padding-left: 40px;
}
.crm-reference-search .crm-search-field input {
  min-height: 38px;
  font-size: 11px;
}
.crm-reference-search .crm-search-glyph {
  top: 13px;
  left: 15px;
  width: 12px;
  height: 12px;
}
.crm-reference-search .crm-mine-filter {
  flex: 0 0 auto;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
@media (max-width: 620px) {
  .crm-reference-search {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }
  .crm-reference-search .crm-search-field {
    flex-basis: auto;
    width: 100%;
  }
  .crm-reference-search .crm-mine-filter { min-height: 34px; }
}
.crm-bulk-toolbar { display: flex; align-items: center; gap: 8px; min-height: 42px; margin-bottom: 10px; padding: 7px 10px; border: 1px solid #d8e0e9; border-radius: 5px; background: #f5f8fb; }
.crm-bulk-toolbar[hidden] { display: none; }
.crm-bulk-toolbar strong { margin-right: auto; color: #374456; font-size: 11px; }
.crm-bulk-toolbar button { min-height: 28px; padding: 5px 8px; border: 1px solid #ccd5df; border-radius: 4px; background: #fff; color: #435268; font-size: 10px; cursor: pointer; }
.crm-reference-table-wrap { border-radius: 4px; background: #fff; }
.crm-reference-deals-table { min-width: 2150px; table-layout: fixed; }
.crm-reference-deals-table th.crm-select-column,
.crm-reference-deals-table td.crm-select-column { width: 40px; padding-inline: 10px; text-align: center; }
.crm-reference-deals-table th:nth-child(2) { width: 170px; }
.crm-reference-deals-table th:nth-child(3) { width: 140px; }
.crm-reference-deals-table th:nth-child(4) { width: 135px; }
.crm-reference-deals-table th:nth-child(5) { width: 132px; }
.crm-reference-deals-table th:nth-child(6) { width: 124px; }
.crm-reference-deals-table th:nth-child(7) { width: 170px; }
.crm-reference-deals-table th:nth-child(8) { width: 225px; }
.crm-reference-deals-table th:nth-child(9) { width: 185px; }
.crm-reference-deals-table th:nth-child(10) { width: 220px; }
.crm-reference-deals-table th:nth-child(11) { width: 155px; }
.crm-reference-deals-table th:nth-child(12) { width: 140px; }
.crm-reference-deals-table th:nth-child(13),
.crm-reference-deals-table th:nth-child(14) { width: 128px; }
.crm-reference-deals-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: #2a70dd; }
.crm-reference-deals-table tbody tr.is-selected { background: #f1f6fc; }
.crm-reference-deals-table td {
  height: 62px;
  padding: 10px 12px;
  color: #343b45;
  line-height: 1.35;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.crm-reference-deals-table th:nth-child(5),
.crm-reference-deals-table th:nth-child(6),
.crm-reference-deals-table td:nth-child(5),
.crm-reference-deals-table td:nth-child(6),
.crm-reference-deals-table td:nth-child(9),
.crm-reference-deals-table td:nth-child(10) { text-align: center; }
.crm-reference-deals-table th:nth-child(5) .crm-column-filter,
.crm-reference-deals-table th:nth-child(6) .crm-column-filter { justify-content: center; width: 100%; }
.crm-reference-deals-table th:nth-child(5) .crm-column-filter-trigger,
.crm-reference-deals-table th:nth-child(6) .crm-column-filter-trigger { justify-content: center; text-align: center; }
.crm-column-filter-trigger > span:first-child small { display: block; color: inherit; font: inherit; letter-spacing: 0; }
.crm-reference-deals-table td:nth-child(5) .muted,
.crm-reference-deals-table td:nth-child(6) .muted { display: inline-block; min-width: 26px; text-align: center; }
.crm-reference-deals-table td:nth-child(9) { padding-right: 20px; padding-left: 20px; }
.crm-reference-deals-table td:nth-child(10) { padding-right: 20px; padding-left: 20px; }
.crm-reference-deals-table td:nth-child(10) .crm-reference-tag-list { justify-content: center; }
.crm-reference-deals-table tbody tr:hover { background: #fafcff; }
.crm-reference-deals-table .crm-entity-link { color: #343b45; font-weight: 650; }
.crm-reference-deals-table .crm-client-link { color: #343b45; font-weight: 650; text-decoration: none; }
.crm-mode .crm-reference-deals-table .crm-entity-link {
  color: #343b45;
  font-weight: 650;
  text-decoration: none;
}
.crm-deal-list-summary { display: grid; gap: 3px; line-height: 1.25; }
.crm-deal-list-summary strong { font: inherit; }
.crm-deal-list-summary small { margin: 0; overflow: hidden; color: #788495; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.crm-company-table .crm-client-link { color: #343b45; font-size: 11px; font-weight: 650; }
.crm-reference-deals-table time small { display: block; margin-top: 2px; }
.crm-reference-event { display: inline-flex; align-items: center; gap: 6px; }
.crm-reference-event-icon { color: #303a46; font-size: 8px; }
.crm-reference-tag-list { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crm-reference-tag-list > span {
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef3fb;
  color: #52647a;
  font-size: 9px;
  font-weight: 700;
}
.crm-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #dbe1e8;
  border-radius: 4px;
  background: #f7f9fb;
}
.crm-action-icon img { width: 14px; height: 14px; opacity: .86; }
.crm-icon-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(35, 42, 51, .92);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(21, 27, 35, .16);
}
.crm-icon-tooltip[hidden] { display: none; }
.analytics-funnel-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.analytics-conversion-table { display: grid; gap: 0; }
.analytics-conversion-table > div { display: grid; grid-template-columns: minmax(130px, 1fr) 62px 84px 72px; align-items: center; min-height: 38px; border-top: 1px solid #e7ebef; color: #4f5b69; font-size: 10px; }
.analytics-conversion-table > div > :not(:first-child) { text-align: right; }
.analytics-conversion-table .head { border-top: 0; color: #7a8491; font-size: 9px; font-weight: 750; }
@media (max-width: 1180px) { .analytics-funnel-comparison { grid-template-columns: 1fr; } }
.crm-action-icon.email { background: #f7f4fb; }
.crm-action-icon.messenger { background: #f1f7f4; }
.crm-action-icon.in_person,
.crm-action-icon.video_meeting,
.crm-action-icon.meeting { background: #faf7f0; }
.crm-next-step-missing { border-color: #ecd0d4; background: #fcf5f6; }
.crm-next-step-missing img { opacity: .72; filter: invert(24%) sepia(33%) saturate(2447%) hue-rotate(314deg) brightness(88%) contrast(89%); }

.crm-deal-reference { color: #252b33; }
.crm-deal-reference .crm-back { color: #738093; }
.crm-deal-reference .crm-deal-head { margin-bottom: 12px; padding: 18px; border: 1px solid #dfe4ea; border-radius: 6px; background: #f6f7f9; }
.activity-status-model.crm-deal-status-model {
  grid-template-columns: repeat(var(--deal-status-count, 5), minmax(104px, 1fr));
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid #dce2e9;
  border-radius: 6px;
}
.crm-deal-status-model .activity-status-button { cursor: default; }
.crm-deal-status-model > form { min-width: 0; margin: 0; }
.crm-deal-status-model > form .activity-status-button { width: 100%; cursor: pointer; }
.crm-deal-status-model > form .activity-status-button:hover { background: #fff; color: #263241; }
.crm-deal-heading-copy { display: grid; gap: 8px; min-width: 0; }
.crm-deal-eyebrow { color: #7b8592; font-size: 10px; font-weight: 750; }
.crm-deal-title-line { gap: 7px; }
.crm-deal-reference .crm-deal-title-line h1 { letter-spacing: 0; }
.crm-deal-summary-pills { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.crm-sales-channel { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid #d4dbe4; border-radius: 4px; background: #fff; color: #536173; font-size: 10px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.crm-sales-channel.direct { border-color: #bfd5ec; background: #edf5fc; color: #285f91; }
.crm-sales-channel.partner { border-color: #c5dfd0; background: #eff8f3; color: #2a6948; }
.crm-sales-channel.referred_client { border-color: #d8caed; background: #f6f1fb; color: #67438b; }
.crm-deal-reference .crm-deal-facts {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #e0e5eb;
  border-radius: 6px;
  box-shadow: none;
}
.crm-deal-reference .crm-deal-facts > div { padding: 12px; border-right: 1px solid #e8ebef; border-bottom: 1px solid #e8ebef; }
.crm-deal-reference .crm-pipeline {
  gap: 5px;
  margin: 0 0 22px;
  padding: 7px;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  background: #f4f6f8;
}
.crm-deal-reference .crm-pipeline-step { min-height: 34px; border-radius: 4px; background: #fff; }
.crm-deal-reference .crm-pipeline-step strong { font-size: 10px; }
.crm-deal-reference-grid {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(520px, 1.05fr);
  gap: 30px;
  align-items: start;
  min-width: 0;
}
.crm-reference-events,
.crm-reference-context { min-width: 0; background: #fff; }
.crm-reference-events { border-top: 1px solid #dfe4e9; }
.crm-reference-section-head {
  min-height: 48px;
  padding: 14px 0 10px;
  border-bottom: 1px solid #dfe4e9;
}
.crm-reference-section-head h2,
.crm-reference-additional-data h2 { margin: 0; font-size: 14px; }
.crm-reference-new-event {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  margin: 14px 0 20px;
  border: 1px solid #dce2e8;
  border-radius: 5px;
  background: #fff;
  color: #2871d8;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.crm-reference-new-event:hover { background: #f8fbff; }
.crm-reference-activity-form { margin-bottom: 18px; border: 1px solid #e0e5ea; border-radius: 6px; }
.crm-reference-next-step {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #bdd4f3;
  border-radius: 6px;
  background: #eef5fd;
}
.crm-reference-next-step > header { display: flex; align-items: center; justify-content: space-between; }
.crm-reference-next-step > header h3 { margin: 0; }
.crm-reference-next-step > header button { border: 0; background: transparent; color: #d50013; font-size: 26px; cursor: pointer; }
.crm-reference-event-period { margin-top: 18px; }
.crm-reference-event-period h3 { margin: 0 0 12px; font-size: 13px; }
.crm-reference-event-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #e0e5ea;
  border-radius: 6px;
  background: #f8f9fb;
}
.crm-reference-event-card > header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}
.crm-reference-event-card > header div { min-width: 0; }
.crm-reference-event-card > header strong,
.crm-reference-event-card > header small { display: block; }
.crm-reference-event-card > header strong { font-size: 12px; }
.crm-reference-event-card > header small { margin-top: 2px; color: #77818e; font-size: 10px; }
.crm-reference-event-label { display: block; margin-bottom: 5px; color: #727c88; font-size: 10px; }
.crm-reference-event-card > strong { font-size: 12px; }
.crm-reference-event-card > p { margin: 7px 0 0; color: #56606c; font-size: 11px; line-height: 1.45; }
.crm-reference-event-card > footer { display: flex; gap: 9px; margin-top: 14px; }
.crm-reference-event-card > footer a {
  padding: 7px 10px;
  border-radius: 4px;
  background: #edf2f7;
  color: #3972ba;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}
.crm-reference-event-card > footer a:hover { background: #e3ebf4; }
.crm-reference-empty { margin: 0 0 18px; color: #818a96; font-size: 11px; }

.crm-reference-tabs { gap: 18px; }
.crm-reference-tabs button { padding: 15px 0 12px; }
.crm-reference-tabs button.active { border-color: #2f73df; color: #252b33; }
.crm-reference-tabs button span { color: #6e7885; }
.crm-reference-context > .crm-tab-panel { padding: 20px 0; }
.crm-reference-client-card {
  padding: 16px;
  border: 1px solid #e0e5ea;
  border-radius: 6px;
  background: #fff;
}
.crm-reference-client-card h2 { margin: 0; font-size: 13px; }
.crm-reference-client-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.crm-reference-client-links a,
.crm-reference-client-links span { color: #2871d8; font-size: 10px; text-decoration: none; }
.crm-reference-client-links span { color: #687482; }
.crm-reference-client-card dl { margin: 16px 0 0; }
.crm-reference-client-card dl > div {
  display: grid;
  grid-template-columns: minmax(110px, .6fr) minmax(160px, 1fr);
  gap: 14px;
  padding: 7px 0;
  border-top: 1px dotted #d9dee4;
}
.crm-reference-client-card dt { color: #77818d; font-size: 10px; }
.crm-reference-client-card dd { margin: 0; font-size: 11px; font-weight: 650; }
.crm-reference-company-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 22px; }
.crm-reference-company-tags > span:not(.muted) {
  padding: 5px 8px;
  border-radius: 4px;
  background: #eef1f5;
  color: #566170;
  font-size: 10px;
  font-weight: 650;
}
.crm-reference-additional-data > h2 { margin-bottom: 10px; }
.crm-reference-additional-data dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}
.crm-reference-additional-data dl > div {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  align-items: baseline;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dotted #d7dce2;
}
.crm-reference-additional-data dt { color: #78828e; font-size: 10px; }
.crm-reference-additional-data dd { min-width: 0; margin: 0; font-size: 11px; font-weight: 650; text-align: left; overflow-wrap: anywhere; }
.crm-reference-records { margin-bottom: 18px; }
.crm-reference-contact-list { border-top: 1px solid #e3e7ec; }
.crm-reference-contact-list strong em { margin-left: 6px; padding: 2px 5px; border-radius: 4px; background: #eef3f8; color: #56687c; font-size: 8px; font-style: normal; }
.crm-reference-contact-list small { display: block; margin-top: 4px; color: #697586; font-size: 10px; }
.crm-reference-add-contact { margin-bottom: 14px; }
.crm-reference-add-contact > summary { width: fit-content; list-style: none; }
.crm-reference-add-contact > form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; padding: 14px; border: 1px solid #dfe4ea; border-radius: 6px; background: #f8f9fb; }
.crm-reference-add-contact label { display: grid; gap: 5px; color: #687485; font-size: 10px; font-weight: 750; }
.crm-reference-add-contact input { min-height: 36px; margin: 0; }
.crm-reference-add-contact .crm-check { display: flex; align-items: center; }
.crm-reference-add-contact .crm-check input { width: 15px; min-height: 15px; }
.crm-reference-add-contact button { justify-self: start; }

.crm-deal-products-panel { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #e2e6eb; }
.crm-deal-products-panel > header span { color: #74808e; font-size: 10px; font-weight: 750; }
.crm-deal-products-panel h2 { margin: 3px 0 12px; font-size: 14px; }
.crm-deal-products-panel form { display: grid; gap: 12px; }
.crm-product-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.crm-product-picker label { position: relative; }
.crm-product-picker input { position: absolute; opacity: 0; pointer-events: none; }
.crm-product-picker label span,
.crm-product-picker.readonly > span { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 9px; border: 1px solid #d9dfe7; border-radius: 4px; background: #fff; color: #536071; font-size: 10px; font-weight: 750; cursor: pointer; }
.crm-product-picker input:checked + span { border-color: #9fc0e8; background: #edf5ff; color: #245f9f; }
.crm-product-picker input:focus-visible + span { outline: 2px solid #3578d4; outline-offset: 2px; }
.crm-deal-products-panel button { justify-self: start; }

.crm-deal-history { display: grid; gap: 10px; }
.crm-deal-history .activity-history-event { min-height: 76px; }

.crm-reference-communications { display: grid; gap: 14px; }
.crm-reference-communication {
  padding: 16px;
  border: 1px solid #e0e5ea;
  border-radius: 6px;
  background: #fff;
}
.crm-reference-communication > header { display: flex; align-items: center; gap: 10px; }
.crm-reference-communication > header div { min-width: 0; }
.crm-reference-communication > header strong,
.crm-reference-communication > header time { display: block; }
.crm-reference-communication > header strong { font-size: 12px; }
.crm-reference-communication > header time { margin-top: 2px; color: #77818d; font-size: 10px; }
.crm-reference-communication > section { margin-top: 13px; padding: 11px 12px; background: #f7f8fa; }
.crm-reference-communication > section > span { color: #65707d; font-size: 10px; font-weight: 700; }
.crm-reference-communication > section p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.crm-reference-communication .crm-reference-comment { color: #5e6874; }
.crm-reference-communication dl { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 16px 0 0; }
.crm-reference-communication dl > div { min-width: 0; }
.crm-reference-communication dt { margin-bottom: 7px; color: #727d89; font-size: 10px; font-weight: 700; }
.crm-reference-communication dd { margin: 0; }
.crm-reference-communication dd strong,
.crm-reference-communication dd span { display: block; overflow-wrap: anywhere; }
.crm-reference-communication dd strong { font-size: 11px; }
.crm-reference-communication dd span { margin-top: 4px; color: #6d7783; font-size: 10px; }

@media (max-width: 1100px) {
  .crm-deal-reference-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .crm-reference-search { grid-template-columns: 1fr; }
  .crm-reference-search .button { width: 100%; }
  .crm-reference-client-card dl > div,
  .crm-reference-additional-data dl > div,
  .crm-reference-communication dl { grid-template-columns: 1fr; }
  .crm-reference-additional-data dd { text-align: left; }
  .crm-deal-reference .crm-deal-facts,
  .crm-reference-add-contact > form { grid-template-columns: 1fr; }
}

/* Keep the redesigned CRM screens above the legacy CRM compatibility rules. */
.crm-mode .crm-subnav {
  align-self: stretch;
  gap: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.crm-mode .crm-subnav a {
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 3px solid transparent;
  color: #606978;
  font-size: 13px;
  font-weight: 650;
}
.crm-mode .crm-subnav a.active { border-color: #2d73e8; color: #1b2027; font-weight: 800; }
.crm-mode .crm-page-head,
.crm-mode .crm-company-head,
.crm-mode .crm-deal-head { align-items: center; margin-bottom: 24px; }
.crm-mode .crm-back { margin-bottom: 20px; color: #77818e; font-size: 11px; }
.crm-mode .crm-table-wrap { border-color: #e0e5eb; border-radius: 6px; }
.crm-mode .crm-table { min-width: 1040px; color: #333a44; font-size: 11px; }
.crm-mode .crm-company-table { min-width: 1420px; }
.crm-mode .crm-deals-table { min-width: 1580px; }
.crm-mode .crm-activities-table { min-width: 1450px; }
.crm-mode .crm-table th {
  height: 48px;
  padding: 12px 15px;
  border-bottom-color: #e2e6ec;
  background: #fff;
  color: #737e8c;
  font-size: 10px;
  font-weight: 750;
  text-transform: none;
  white-space: nowrap;
}
.crm-mode .crm-table td {
  height: 62px;
  padding: 11px 15px;
  border-bottom-color: #e9edf1;
  vertical-align: middle;
}
.crm-mode .crm-entity-link { color: #2a70dd; font-size: 12px; font-weight: 750; text-decoration: none; }
.crm-mode .crm-row-action { text-align: left; white-space: nowrap; }
.crm-mode .crm-owner-tag { border: 0; background: #edf3fc; color: #2d6fc8; }
.crm-mode .crm-data-tag.origin { border: 0; }
.crm-mode .crm-band { margin-top: 24px; }
.crm-mode .crm-dossier-grid { gap: 30px; }
.crm-mode .crm-tabs { gap: 30px; border-bottom-color: #e3e8ed; }
.crm-mode .crm-tabs button { padding: 17px 0 13px; color: #6b7582; font-size: 11px; }
.crm-mode .crm-tabs button.active { border-color: #2d73e8; color: #242a32; }
.crm-mode .crm-tab-panel { min-height: 0; padding: 18px 0; }
.crm-mode .crm-activity-form {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #dfe5eb;
  border-radius: 6px;
  background: #f8fafc;
}
.crm-mode .crm-timeline { padding: 0; }
.crm-mode .crm-timeline-item {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 10px;
  border: 1px solid #e6eaef;
  border-top: 0;
}
.crm-mode .crm-timeline-item:first-child { border-top: 1px solid #e6eaef; border-radius: 5px 5px 0 0; }
.crm-mode .crm-timeline-item:last-child { border-radius: 0 0 5px 5px; }
.crm-mode .crm-timeline-icon { width: 32px; height: 32px; background: #eaf7ef; color: #279b5b; }
.crm-mode .crm-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-left-color: #2d73e8;
  background: #f4f7fc;
}
.crm-company-create-head { width: min(1080px, 100%); margin-inline: auto; }
.crm-company-create-head h1 { margin-top: 8px; }
.crm-company-create-form { width: min(1080px, 100%); margin: 0 auto; }
.crm-company-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.crm-company-create-section {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid #dfe5eb;
  border-radius: 6px;
  background: #fff;
}
.crm-company-create-section legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  color: #252b33;
  font-size: 15px;
  font-weight: 800;
}
.crm-company-create-section .section-icon { width: 27px; height: 27px; }
.crm-company-create-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.crm-company-create-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #343c46;
  font-size: 11px;
  font-weight: 750;
}
.crm-company-create-fields label.wide { grid-column: 1 / -1; }
.crm-company-create-fields label > span {
  color: #8a939f;
  font-size: 9px;
  font-weight: 650;
}
.crm-company-create-fields input { width: 100%; margin: 0; }
.crm-company-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.crm-company-create-actions .button,
.crm-company-create-actions button { min-height: 42px; }

@media (max-width: 760px) {
  .crm-mode .crm-subnav { min-width: max-content; gap: 24px; }
  .crm-mode .crm-page-head,
  .crm-mode .crm-company-head,
  .crm-mode .crm-deal-head { align-items: stretch; gap: 14px; }
  .crm-company-create-grid,
  .crm-company-create-fields { grid-template-columns: 1fr; }
  .crm-company-create-fields label.wide { grid-column: auto; }
  .crm-company-create-section { padding: 16px; }
  .crm-company-create-actions { align-items: stretch; flex-direction: column-reverse; }
  .crm-company-create-actions .button,
  .crm-company-create-actions button { width: 100%; }
}

/* CRM visual system */
body.top-nav-mode {
  min-width: 320px;
}
.pull-refresh-indicator {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 50%;
  padding: 7px 11px;
  transform: translate(-50%, -150%);
  border: 1px solid #cfd6de;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(25, 35, 48, .12);
  color: #596572;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transition: transform .16s ease, opacity .16s ease;
  pointer-events: none;
}
.pull-refresh-indicator.visible { transform: translate(-50%, 0); opacity: calc(.45 + var(--pull-progress, 0) * .55); }
.pull-refresh-indicator.ready,
.pull-refresh-indicator.loading { border-color: #e60012; color: #b90010; opacity: 1; }
body.crm-mode {
  min-width: 320px;
  background: #fff;
  color: #20242b;
}
.top-nav-mode .workspace {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 32px 30px 28px;
}
.crm-global-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 0;
  background: #fff;
}
.crm-global-row,
.crm-section-row {
  display: flex;
  align-items: center;
  padding: 0 32px;
}
.crm-global-row {
  min-height: 70px;
  border-bottom: 0;
}
.crm-section-row { min-height: 56px; }
.crm-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 210px;
  gap: 10px;
  color: #16191e;
  font-size: 23px;
  font-weight: 850;
  text-decoration: none;
}
.crm-brand-symbol {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  flex: 0 0 40px;
}
.crm-brand-symbol img {
  position: absolute;
  width: 90px;
  height: 90px;
  max-width: none;
  top: -14px;
  left: -25px;
}
.crm-brand strong span { color: #001c36; }
.crm-brand strong { color: #00ad98; }
.crm-global-nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-self: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.crm-global-nav::-webkit-scrollbar { display: none; }
.crm-global-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #505866;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.crm-global-nav a.active {
  color: #181c22;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: #171b21;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}
.crm-global-nav a.active::after {
  content: none;
}
.crm-global-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.crm-app-grid {
  display: grid;
  grid-template-columns: 6px 6px;
  gap: 4px;
  padding: 9px;
}
.crm-app-grid i { width: 6px; height: 6px; border-radius: 2px; background: #515968; }
.crm-user-dropdown { position: relative; }
.crm-user-dropdown > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 165px;
  list-style: none;
  cursor: pointer;
}
.crm-user-dropdown > summary::-webkit-details-marker { display: none; }
.crm-user-avatar,
.crm-person-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #34404e;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}
.crm-user-avatar { width: 38px; height: 38px; background: #1c252f; font-size: 14px; }
.crm-user-copy { display: grid; gap: 2px; min-width: 0; }
.crm-user-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.crm-user-copy small { color: #6c7582; font-size: 10px; }
.crm-user-chevron { margin-left: auto; color: #737c88; }
.crm-user-menu,
.crm-action-menu > div {
  position: absolute;
  z-index: 25;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: 190px;
  padding: 7px;
  border: 1px solid #dce1e7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 30, 40, .14);
}
.crm-user-menu a,
.crm-user-menu button,
.crm-action-menu > div a {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #343b45;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.crm-user-menu a:hover,
.crm-user-menu button:hover,
.crm-action-menu > div a:hover { background: #f4f6f8; }
.crm-subnav {
  align-self: stretch;
  gap: 38px;
  margin: 0;
  padding: 0;
  border: 0;
}
.crm-subnav a {
  display: flex;
  align-items: center;
  padding: 0 0;
  border-bottom: 3px solid transparent;
  color: #606978;
  font-size: 13px;
  font-weight: 650;
}
.crm-subnav a.active { border-color: #2d73e8; color: #1b2027; font-weight: 800; }
.crm-scope-label { margin-left: auto; color: #6c7584; font-size: 12px; font-weight: 650; }
.crm-workspace {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 32px 30px 28px;
  background: #fff;
}
.crm-mode h1 { margin: 0; color: #20242b; font-size: 24px; font-weight: 800; }
.crm-mode h2 { color: #242a32; font-size: 15px; }
.crm-page-head,
.crm-company-head,
.crm-deal-head {
  align-items: center;
  margin-bottom: 24px;
}
.crm-page-actions,
.crm-deal-actions { display: flex; align-items: center; gap: 10px; }
.crm-mode .button {
  min-height: 38px;
  padding: 9px 14px;
  border-color: #dbe0e6;
  background: #fff;
  color: #343b45;
  font-size: 12px;
  font-weight: 750;
}
.crm-mode .button.primary {
  border-color: #e60012;
  background: #e60012;
  color: #fff;
  box-shadow: 0 2px 4px rgba(133, 0, 12, .12);
}
.crm-mode .button.primary:hover { background: #c90010; }
.crm-mode input,
.crm-mode select,
.crm-mode textarea {
  border-color: #dce2e9;
  color: #29303a;
}
.crm-company-filters,
.crm-deals-filters,
.crm-activities-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.crm-company-filters { grid-template-columns: minmax(300px, 1.7fr) repeat(4, minmax(150px, 1fr)) minmax(130px, .75fr); }
.crm-deals-filters { grid-template-columns: minmax(320px, 1.7fr) minmax(155px, .8fr) repeat(5, minmax(145px, 1fr)) minmax(130px, .7fr); }
.crm-activities-filters { grid-template-columns: minmax(360px, 1.8fr) minmax(130px, .7fr) repeat(4, minmax(155px, 1fr)) minmax(130px, .7fr); }
.crm-search-field,
.crm-select-field,
.crm-mine-filter,
.crm-more-filters {
  position: relative;
  min-width: 0;
  min-height: 68px;
  margin: 0;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  background: #fff;
}
.crm-search-field { display: flex; align-items: center; padding: 0 16px 0 48px; }
.crm-search-field input {
  min-height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 12px;
}
.crm-search-glyph {
  position: absolute;
  top: 24px;
  left: 18px;
  width: 14px;
  height: 14px;
  border: 2px solid #687384;
  border-radius: 50%;
}
.crm-search-glyph::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  transform: rotate(45deg);
  background: #687384;
  content: "";
}
.crm-select-field { display: grid; align-content: center; padding: 9px 13px; }
.crm-select-field > span { color: #7a8492; font-size: 10px; font-weight: 650; }
.crm-select-field select {
  min-height: 28px;
  margin: 0;
  padding: 2px 28px 0 0;
  border: 0;
  outline: 0;
  background-color: transparent;
  font-size: 12px;
  font-weight: 750;
}
.crm-mine-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  color: #343b45;
  font-size: 12px;
  font-weight: 750;
}
.crm-mine-filter input { width: 15px; height: 15px; min-height: 0; margin: 0; }
.crm-more-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  color: #424a56;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.crm-reset-filters {
  grid-column: 1 / -1;
  width: fit-content;
  color: #2a6fd6;
  font-size: 11px;
  text-decoration: none;
}
.crm-table-wrap {
  overflow-x: auto;
  border: 1px solid #e0e5eb;
  border-radius: 6px;
  background: #fff;
}
.crm-table { min-width: 1040px; color: #333a44; font-size: 11px; }
.crm-company-table { min-width: 1420px; }
.crm-company-table th.crm-select-column,
.crm-company-table td.crm-select-column { width: 40px; padding-inline: 10px; text-align: center; }
.crm-company-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: #2a70dd; }
.crm-company-table tbody tr.is-selected { background: #f4f7fa; }
.crm-deals-table { min-width: 1580px; }
.crm-activities-table { min-width: 1450px; }
.crm-table th {
  height: 48px;
  padding: 12px 15px;
  border-bottom: 1px solid #e2e6ec;
  background: #fff;
  color: #737e8c;
  font-size: 10px;
  font-weight: 750;
  text-transform: none;
  white-space: nowrap;
}
.crm-column-filter { display: inline-flex; max-width: 100%; }
.crm-column-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: -7px -9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  letter-spacing: 0;
  text-align: left;
}
.crm-column-filter-trigger:hover,
.crm-column-filter-trigger[aria-expanded="true"] { background: #f2f5f9; color: #293543; }
.crm-column-filter.active .crm-column-filter-trigger { color: #2a70dd; }
.crm-column-filter-glyph {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}
.crm-column-filter-glyph::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 7px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.crm-column-filter.active .crm-column-filter-glyph::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #2a70dd;
}
.crm-column-filter-popover {
  position: fixed;
  z-index: 2500;
  max-height: min(430px, calc(100vh - 24px));
  overflow: auto;
  padding: 14px;
  border: 1px solid #dce2e9;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 38px rgb(23 34 48 / 18%);
  color: #303946;
  white-space: normal;
}
.crm-column-filter-popover[hidden] { display: none; }
.crm-column-filter-popover form { display: grid; gap: 9px; margin: 0; }
.crm-column-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.crm-column-filter-head strong { font-size: 12px; }
.crm-column-filter-clear {
  display: inline-grid;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #717b88;
  font-size: 18px;
  line-height: 1;
  place-items: center;
  cursor: pointer;
}
.crm-column-filter-clear:hover { background: #f1f4f7; color: #303946; }
.crm-column-filter-search { position: relative; display: block; }
.crm-column-filter-search .crm-search-glyph { left: 11px; top: 50%; transform: translateY(-50%); }
.crm-column-filter-search input,
.crm-column-filter-input input {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d8dee6;
  border-radius: 5px;
  background: #fff;
  color: #303946;
  font-size: 12px;
  letter-spacing: 0;
}
.crm-column-filter-search input { padding-left: 34px; }
.crm-column-filter-input { display: grid; gap: 6px; }
.crm-column-filter-input > span { color: #747e8c; font-size: 10px; }
.crm-column-filter-options { display: flex; flex-direction: column; align-items: stretch; max-height: 250px; overflow-y: auto; }
.crm-column-filter-select-all {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 7px;
  border-bottom: 1px solid #edf0f4;
  color: #303946;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.crm-column-filter-select-all input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2a70dd;
}
.crm-column-filter-options label {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 9px;
  height: auto;
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 4px;
  color: #37414e;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
}
.crm-column-filter-options label:hover { background: #f3f6fa; }
.crm-column-filter-options label[hidden] { display: none; }
.crm-column-filter-options label > span { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.crm-column-filter-options input { flex: 0 0 15px; width: 15px; height: 15px; margin: 1px 0 0; accent-color: #2a70dd; }
.crm-column-filter-empty { margin: 8px 4px; color: #7c8592; font-size: 11px; }
.crm-column-filter-hint { color: #7c8592; font-size: 10px; }
.crm-table td {
  height: 62px;
  padding: 11px 15px;
  border-bottom-color: #e9edf1;
  vertical-align: middle;
}
.crm-table tbody tr:hover { background: #fbfcfd; }
.crm-table td > strong { display: block; font-size: 12px; }
.crm-table td small { color: #828b98; font-size: 10px; }
.crm-entity-link { color: #2a70dd; font-size: 12px; font-weight: 750; text-decoration: none; }
.crm-entity-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.crm-person { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.crm-avatar-stack { display: inline-flex; align-items: center; min-height: 30px; }
.crm-avatar-stack .crm-person-avatar + .crm-person-avatar { margin-left: -8px; }
.crm-avatar-extra {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -3px;
  border-radius: 50%;
  background: #f0f2f5;
  color: #596370;
  font-size: 10px;
  font-weight: 800;
}
.crm-row-action { white-space: nowrap; }
.crm-row-action .button { min-height: 34px; padding: 8px 12px; }
.crm-kebab { display: inline-block; margin-left: 9px; color: #5e6875; font-size: 13px; letter-spacing: 0; }
.crm-status,
.crm-product-tag,
.crm-activity-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 0;
  border-radius: 5px;
  background: #eef1f5;
  color: #5c6673;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.crm-product-tag { border-color: #cbd9eb; background: #edf4ff; color: #3371c9; }
.crm-product-tag.product-tone-1 { border-color: #bed6ed; background: #edf5fc; color: #286293; }
.crm-product-tag.product-tone-2 { border-color: #c5dfd0; background: #eff8f3; color: #2a6948; }
.crm-product-tag.product-tone-3 { border-color: #d7c8ed; background: #f4effb; color: #684da0; }
.crm-product-tag.product-tone-4 { border-color: #ead5ad; background: #fbf5e8; color: #7b5a1d; }
.crm-product-tag.product-tone-5 { border-color: #efc6cf; background: #fcf0f3; color: #985064; }
.crm-product-tag.product-tone-6 { border-color: #bddddd; background: #edf8f7; color: #286b69; }
.crm-status.new { background: #eef1f5; color: #5e6875; }
.crm-status.contact_established { background: #e9f2ff; color: #2d6dca; }
.crm-status.interest { background: #eaf8ef; color: #26965b; }
.crm-status.proposal,
.crm-status.quotation { background: #f0edff; color: #6752c8; }
.crm-status.pilot_agreement { background: #fff3e5; color: #d47822; }
.crm-status.sales,
.crm-status.won { background: #e8f8ef; color: #198c4c; }
.crm-status.lost,
.crm-status.closed { background: #ffebed; color: #c43d49; }
.crm-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #8a94a2;
}
.crm-status-dot.contact_established { background: #27a86b; }
.crm-status-dot.interest { background: #2acb7a; }
.crm-status-dot.proposal,
.crm-status-dot.quotation { background: #2c75ee; }
.crm-status-dot.pilot_agreement { background: #ff9a22; }
.crm-status-dot.sales { background: #f04253; }
.crm-status-dot.closed { background: #6d7480; }
.crm-activity-state.overdue { background: #ffeaec; color: #d3404d; }
.crm-activity-state.planned { background: #eaf2ff; color: #3474d2; }
.crm-activity-state.completed { background: #eaf7ef; color: #238f53; }
.crm-overdue-date { color: #d8444e; font-weight: 750; }
.crm-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 880px;
  min-height: 64px;
  padding: 10px 15px;
  color: #7c8592;
  font-size: 11px;
}
.crm-table-paging { display: flex; align-items: center; gap: 7px; }
.crm-table-paging form { margin: 0 12px 0 0; }
.crm-table-paging select { width: auto; min-width: 130px; min-height: 36px; margin: 0; padding: 7px 30px 7px 10px; }
.crm-page-number,
.crm-page-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e0e5eb;
  border-radius: 5px;
  color: #46505d;
  font-size: 12px;
  text-decoration: none;
}
.crm-page-number.active { border-color: #2d73e8; background: #2d73e8; color: #fff; }
.crm-page-gap { padding: 0 4px; }
.crm-back { margin-bottom: 20px; color: #77818e; font-size: 11px; }
.crm-deal-hero { margin-bottom: 20px; }
.crm-deal-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.crm-deal-title-line h1 { font-size: 25px; }
.crm-action-menu { position: relative; }
.crm-action-menu > summary { list-style: none; cursor: pointer; }
.crm-action-menu > summary::-webkit-details-marker { display: none; }
.crm-deal-facts {
  display: grid;
  grid-template-columns: 1.2fr .7fr .9fr 1.1fr .8fr .72fr .8fr;
  gap: 26px;
  padding: 0 0 24px;
  border-bottom: 1px solid #e5e9ee;
}
.crm-deal-facts > div { min-width: 0; }
.crm-deal-facts > div > span:first-child { display: block; margin-bottom: 9px; color: #7a8491; font-size: 10px; font-weight: 650; }
.crm-deal-facts a { color: #2a70dd; font-size: 12px; font-weight: 750; text-decoration: none; }
.crm-deal-facts strong { font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.crm-deal-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid #e1e6ec;
  border-radius: 6px;
  background: #fafbfd;
}
.crm-deal-edit-form input,
.crm-deal-edit-form select { min-height: 38px; margin: 5px 0 0; }
.crm-deal-edit-form > button { justify-self: start; }
.crm-commercial-records {
  margin-top: 14px;
  overflow: visible;
  border: 1px solid #e1e6ec;
  border-radius: 6px;
  background: #fff;
}
.crm-commercial-records > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid #e8ebef;
}
.crm-commercial-records > header span {
  display: block;
  margin-bottom: 2px;
  color: #d00012;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.crm-commercial-records > header h2 { margin: 0; font-size: 15px; }
.crm-commercial-records details { position: relative; }
.crm-commercial-records summary { list-style: none; cursor: pointer; }
.crm-commercial-records summary::-webkit-details-marker { display: none; }
.crm-commercial-records details > form {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px;
  width: min(520px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid #dce1e7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 31, 40, .16);
}
.crm-commercial-records details > form label {
  display: grid;
  gap: 5px;
  color: #66707c;
  font-size: 10px;
  font-weight: 800;
}
.crm-commercial-records details > form input,
.crm-commercial-records details > form select { min-height: 38px; margin: 0; }
.crm-commercial-records details > form .crm-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crm-commercial-records details > form .crm-check input {
  width: 16px;
  min-height: 16px;
}
.crm-commercial-records details > form button { justify-self: start; }
.crm-record-list { display: grid; }
.crm-record-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 15px;
  border-bottom: 1px solid #eceff2;
}
.crm-record-list > div:last-child { border-bottom: 0; }
.crm-record-list strong { color: #232932; font-size: 12px; }
.crm-record-list span { color: #69727e; font-size: 11px; text-align: right; }
.crm-record-list > p { margin: 0; padding: 15px; color: #747d88; font-size: 11px; }
.crm-pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(115px, 1fr));
  gap: 0;
  margin: 0;
  padding: 27px 10px 23px;
  overflow-x: auto;
  border-bottom: 1px solid #e5e9ee;
}
.crm-pipeline::before {
  position: absolute;
  top: 35px;
  right: 7%;
  left: 7%;
  height: 1px;
  background: #cfd5dd;
  content: "";
}
.crm-pipeline-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 11px; text-align: center; }
.crm-pipeline-step span { width: 17px; height: 17px; border: 2px solid #c8d0da; border-radius: 50%; background: #fff; }
.crm-pipeline-step strong { color: #687281; font-size: 10px; font-weight: 650; }
.crm-pipeline-step.completed span { border-color: #2d73e8; background: #2d73e8; }
.crm-pipeline-step.completed strong { color: #3c4653; }
.crm-pipeline-step.current span { border-color: #2d73e8; background: #2d73e8; box-shadow: 0 0 0 4px #e5efff; }
.crm-pipeline-step.current strong { color: #2d6dcc; font-weight: 800; }
.crm-deal-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  padding-top: 0;
}
.crm-deal-main { min-width: 0; }
.crm-tabs { gap: 30px; border-bottom-color: #e3e8ed; }
.crm-tabs button { padding: 17px 0 13px; color: #6b7582; font-size: 11px; }
.crm-tabs button.active { border-color: #2d73e8; color: #242a32; }
.crm-tab-panel { min-height: 0; padding: 18px 0; }
.crm-activity-composer {
  padding: 0 0 14px;
  border-bottom: 1px solid #e6eaef;
}
.crm-activity-composer > span {
  display: block;
  min-height: 48px;
  padding: 14px 15px;
  border: 1px solid #e0e5eb;
  border-radius: 5px;
  color: #8a93a0;
  font-size: 11px;
}
.crm-activity-composer > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.crm-activity-composer button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #e0e5ea;
  border-radius: 5px;
  background: #fff;
  color: #56606d;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.crm-activity-form {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #dfe5eb;
  border-radius: 6px;
  background: #f8fafc;
}
.crm-timeline { padding: 0; }
.crm-timeline-item {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 10px;
  border: 1px solid #e6eaef;
  border-top: 0;
}
.crm-timeline-item:first-child { border-top: 1px solid #e6eaef; border-radius: 5px 5px 0 0; }
.crm-timeline-item:last-child { border-radius: 0 0 5px 5px; }
.crm-timeline-icon { width: 32px; height: 32px; background: #eaf7ef; color: #279b5b; }
.crm-timeline-icon.email { background: #f2edff; color: #7657d2; }
.crm-timeline-icon.in_person,
.crm-timeline-icon.video_meeting { background: #eaf2ff; color: #3478d9; }
.crm-timeline-item header { align-items: center; }
.crm-timeline-item header > span { display: flex; align-items: center; gap: 6px; }
.crm-timeline-item header .crm-person-avatar { width: 24px; height: 24px; font-size: 9px; }
.crm-timeline-item p { margin: 5px 0 0; }
.crm-next-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-left-color: #2d73e8; background: #f4f7fc; }
.crm-deal-aside { display: grid; align-content: start; gap: 18px; padding-top: 28px; }
.crm-deal-aside > section {
  border: 1px solid #e0e5eb;
  border-radius: 6px;
  background: #fff;
}
.crm-deal-aside header { min-height: 48px; padding: 15px 16px 11px; border-bottom: 1px solid #e6eaef; }
.crm-deal-aside h2 { margin: 0; font-size: 13px; }
.crm-next-step-card,
.crm-aside-list,
.crm-company-summary { padding: 14px 16px; }
.crm-next-step-card > p { color: #697381; font-size: 11px; }
.crm-next-step-card > div { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0; color: #606b78; font-size: 10px; }
.crm-next-step-card > div span { padding: 4px 7px; border-radius: 4px; background: #eef1f5; }
.crm-aside-list > div { padding: 10px 0; border-bottom: 1px solid #ebeff3; }
.crm-aside-list > div:last-child { border-bottom: 0; }
.crm-aside-list strong,
.crm-aside-list span { display: block; }
.crm-aside-list strong { font-size: 11px; }
.crm-aside-list span { margin-top: 4px; color: #75808d; font-size: 10px; }
.crm-aside-empty { margin: 0; padding: 16px; color: #7b8592; font-size: 11px; }
.crm-company-summary { margin: 0; }
.crm-company-summary > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 7px 0; }
.crm-company-summary dt { color: #7b8491; font-size: 10px; }
.crm-company-summary dd { margin: 0; font-size: 10px; font-weight: 650; overflow-wrap: anywhere; }
.crm-aside-link { display: inline-block; margin: 0 16px 16px; color: #2d70d5; font-size: 11px; text-decoration: none; }
.crm-band { margin-top: 24px; }
.crm-dossier-grid { gap: 30px; }
.crm-company-head { padding-bottom: 18px; border-bottom: 1px solid #e5e9ee; }
.crm-owner-tag { border: 0; background: #edf3fc; color: #2d6fc8; }
.crm-data-tag.origin { border: 0; }
.crm-mode .crm-employee-filters {
  display: grid;
  grid-template-columns: minmax(390px, 1.7fr) minmax(180px, .8fr) repeat(3, minmax(170px, 1fr)) minmax(125px, .65fr);
  gap: 10px;
  margin-bottom: 20px;
}
.crm-mode .crm-employee-filters .crm-reset-filters { grid-column: 1 / -1; }
.crm-mode .crm-employee-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.crm-mode .crm-employee-metrics article {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 15px 17px;
  border: 1px solid #e0e5ea;
  border-radius: 6px;
  background: #fff;
}
.crm-mode .crm-employee-metrics article > div { display: grid; gap: 7px; min-width: 0; }
.crm-mode .crm-employee-metrics article > div > span { color: #747e8c; font-size: 10px; }
.crm-mode .crm-employee-metrics strong { font-size: 22px; font-weight: 750; }
.crm-mode .crm-metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eef3ff;
  color: #3477df;
  font-size: 12px;
  font-weight: 850;
}
.crm-mode .crm-metric-icon.super { background: #f3ebff; color: #8a4bd1; }
.crm-mode .crm-metric-icon.admin { background: #eaf2ff; color: #2c72da; }
.crm-mode .crm-metric-icon.hunter { background: #e9f8ee; color: #20a157; }
.crm-mode .crm-metric-icon.farmer { background: #fff2e7; color: #e67a1d; }
.crm-mode .crm-metric-icon.inactive { background: #f0f2f5; color: #68717e; }
.crm-mode .crm-employees-table {
  min-width: 1280px;
  table-layout: fixed;
}
.crm-mode .crm-employees-table th:nth-child(1) { width: 16%; }
.crm-mode .crm-employees-table th:nth-child(2) { width: 13%; }
.crm-mode .crm-employees-table th:nth-child(3) { width: 9%; }
.crm-mode .crm-employees-table th:nth-child(4) { width: 10%; }
.crm-mode .crm-employees-table th:nth-child(5) { width: 9%; }
.crm-mode .crm-employees-table th:nth-child(6) { width: 8%; }
.crm-mode .crm-employees-table th:nth-child(7) { width: 9%; }
.crm-mode .crm-employees-table th:nth-child(8) { width: 10%; }
.crm-mode .crm-employees-table th:nth-child(9) { width: 16%; }
.crm-mode .crm-employee-person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #28303a;
  text-decoration: none;
}
.crm-mode .crm-employee-person > span:last-child { display: grid; gap: 3px; }
.crm-mode .crm-employee-person strong { font-size: 12px; }
.crm-mode .crm-employee-person small { margin: 0; }
.crm-mode .crm-access-badge,
.crm-mode .crm-work-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f2f5;
  color: #68717e;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.crm-mode .crm-access-badge.super_admin { background: #fff0f1; color: #d34c55; }
.crm-mode .crm-access-badge.admin { background: #fff4e8; color: #e08023; }
.crm-mode .crm-work-role-badge.hunter { background: #eaf2ff; color: #3175db; }
.crm-mode .crm-work-role-badge.farmer { background: #fff1e5; color: #e4771a; }
.crm-mode .crm-employee-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.crm-mode .crm-employee-status i { width: 7px; height: 7px; border-radius: 50%; background: #8a94a2; }
.crm-mode .crm-employee-status.active i { background: #23b768; }
.crm-mode .crm-employee-status.inactive i { background: #f0a320; }
.crm-mode .crm-employee-status.blocked i { background: #e34450; }
.crm-mode .crm-employee-profile-title { display: flex; align-items: center; gap: 14px; }
.crm-mode .crm-employee-profile-title .crm-user-avatar { width: 48px; height: 48px; }
.crm-mode .crm-employee-profile-title p { margin: 4px 0 0; color: #788290; font-size: 11px; }
.crm-mode .crm-employee-profile-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.crm-mode .crm-employee-profile-metrics article {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 16px;
  border: 1px solid #e0e5ea;
  border-radius: 6px;
}
.crm-mode .crm-employee-profile-metrics span { color: #788290; font-size: 10px; }
.crm-mode .crm-employee-profile-metrics strong { font-size: 13px; }
.crm-mode .crm-employee-profile-form {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #e0e5ea;
  border-radius: 6px;
  background: #fafbfd;
}
.crm-mode .crm-employee-profile-form h2 { margin: 0 0 14px; }
.crm-mode .crm-employee-profile-form > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  align-items: end;
  gap: 10px;
}
.crm-mode .crm-employee-profile-form label { display: grid; gap: 6px; color: #788290; font-size: 10px; }
.crm-mode .crm-employee-profile-form select { min-height: 38px; margin: 0; }
.crm-mode .crm-employee-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.crm-mode .crm-employee-profile-grid > article { border: 1px solid #e0e5ea; border-radius: 6px; }
.crm-mode .crm-employee-profile-grid header { padding: 15px 16px; border-bottom: 1px solid #e7ebef; }
.crm-mode .crm-employee-profile-grid h2 { margin: 0; font-size: 13px; }
.crm-mode .crm-employee-profile-grid article > div { display: grid; padding: 5px 16px; }
.crm-mode .crm-employee-profile-grid a {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f3;
  color: #2a70dd;
  text-decoration: none;
}
.crm-mode .crm-employee-profile-grid a:last-child { border-bottom: 0; }
.crm-mode .crm-employee-profile-grid a strong { font-size: 11px; }
.crm-mode .crm-employee-profile-grid a small,
.crm-mode .crm-employee-profile-grid p { color: #7a8491; font-size: 10px; }

@media (max-width: 1500px) {
  .crm-global-row,
  .crm-section-row { padding-right: 24px; padding-left: 24px; }
  .crm-brand { flex-basis: 165px; }
  .crm-global-nav a { padding: 0 15px; }
  .crm-workspace { padding-right: 22px; padding-left: 22px; }
  .crm-company-filters { grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(145px, 1fr)); }
  .crm-company-filters > :nth-child(5),
  .crm-company-filters > :nth-child(6) { grid-column: auto; }
  .crm-deals-filters,
  .crm-activities-filters { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .crm-deals-filters .crm-search-field,
  .crm-activities-filters .crm-search-field { grid-column: span 2; }
}

@media (max-width: 1050px) {
  .crm-brand { flex-basis: auto; margin-right: 18px; }
  .crm-brand strong { display: none; }
  .crm-global-nav a { padding: 0 11px; }
  .crm-deal-facts { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .crm-deal-workspace { grid-template-columns: 1fr; }
  .crm-deal-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 0; }
  .crm-mode .crm-employee-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .crm-mode .crm-employee-filters .crm-search-field { grid-column: span 2; }
  .crm-mode .crm-employee-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm-mode .crm-employee-profile-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm-mode .crm-employee-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .crm-global-header { position: static; }
  .crm-global-row { min-height: 58px; padding: 0 14px; }
  .crm-brand-symbol { width: 32px; height: 32px; flex-basis: 32px; }
  .crm-brand-symbol img { width: 72px; height: 72px; top: -11px; left: -20px; }
  .crm-global-nav { min-width: 0; }
  .crm-global-nav a { padding: 0 10px; font-size: 12px; }
  .crm-global-actions { margin-left: 12px; }
  .crm-app-grid,
  .crm-user-copy,
  .crm-user-chevron { display: none; }
  .crm-user-dropdown > summary { min-width: 38px; }
  .crm-section-row { min-height: 50px; padding: 0 14px; overflow-x: auto; }
  .crm-subnav { min-width: max-content; gap: 24px; }
  .crm-subnav a { font-size: 12px; }
  .crm-scope-label { display: none; }
  .crm-workspace { padding: 20px 14px; }
  .top-nav-mode .workspace { padding: 20px 14px 28px; }
  .crm-page-head,
  .crm-company-head,
  .crm-deal-head { align-items: stretch; flex-direction: column; gap: 14px; }
  .crm-page-actions .button,
  .crm-deal-actions .button { flex: 1 1 auto; }
  .crm-deal-actions { align-items: stretch; flex-wrap: wrap; }
  .crm-company-filters,
  .crm-deals-filters,
  .crm-activities-filters,
  .crm-mode .crm-employee-filters { grid-template-columns: 1fr; }
  .crm-deals-filters .crm-search-field,
  .crm-activities-filters .crm-search-field,
  .crm-mode .crm-employee-filters .crm-search-field { grid-column: auto; }
  .crm-search-field,
  .crm-select-field,
  .crm-mine-filter,
  .crm-more-filters { min-height: 56px; }
  .crm-search-field input { min-height: 52px; }
  .crm-search-glyph { top: 18px; }
  .crm-mode .crm-employee-metrics,
  .crm-mode .crm-employee-profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-deal-facts { grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 18px; }
  .crm-deal-edit-form { grid-template-columns: 1fr; }
  .crm-pipeline { grid-template-columns: repeat(6, 130px); }
  .crm-tabs { gap: 24px; }
  .crm-deal-aside { grid-template-columns: 1fr; }
  .crm-mode .crm-employee-profile-form > div { grid-template-columns: 1fr; }
  .crm-form-grid,
  .crm-file-form { grid-template-columns: 1fr; }
  .crm-table-footer {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .crm-table-paging { max-width: 100%; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 68px;
    padding: 6px;
  }
  .sidebar .brand-mark { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
  .nav-icon {
    width: 100%;
    min-height: 56px;
    margin: 0;
  }
  .topbar { left: 0; padding: 0 16px; }
  .workspace { margin-left: 0; padding: 80px 12px 92px; }
  .funnel-strip { padding: 16px 12px; }
  .metric-grid { grid-template-columns: 1fr; }
  .company-header, .dashboard-hero { align-items: flex-start; gap: 18px; flex-direction: column; }
  .bpm-access-action { grid-template-columns: 1fr; }
  .bpm-status-save, #bpm-access-message, .bpm-status-owner { grid-column: 1; }
  .bpm-status-save { grid-row: 1; }
  #bpm-access-message { grid-row: 2; }
  .bpm-status-owner { grid-row: 3; }
  .company-edit-grid { grid-template-columns: 1fr; }
  .company-edit-grid .wide { grid-column: 1; }
  .activity-card-list { gap: 10px; }
  .activity-card-header {
    align-items: flex-start;
    padding: 15px 16px 13px;
  }
  .activity-date-label { margin-top: 1px; }
  .activity-card-fields,
  .activity-card-fields.manager-activity-card-fields {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .activity-card-field,
  .activity-card-field + .activity-card-field,
  .activity-card-field:nth-child(3),
  .activity-card-field:nth-child(4) {
    padding: 13px 0;
    border-top: 1px solid rgba(93, 102, 113, .13);
    border-left: 0;
  }
  .activity-card-field:first-child { border-top: 0; }
}

/* Unified employee queue */
.user-password-link {
  color: #5e6773;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}
.user-password-link:hover { color: #e60012; }
.queue-page-head,
.queue-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.queue-page-head { margin-bottom: 16px; }
.queue-page-head p,
.queue-list-heading small { margin: 0; color: #68717c; }
.queue-add-company { text-decoration: none; }
.queue-view-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
}
.queue-view-tabs a {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px 16px;
  color: #4f5864;
  text-decoration: none;
}
.queue-view-tabs a + a { border-left: 1px solid #e5e8ec; }
.queue-view-tabs a.active { box-shadow: inset 0 -3px #e60012; color: #b00011; background: #fff6f7; }
.queue-view-tabs span { font-size: 11px; font-weight: 800; }
.queue-view-tabs strong { color: #171b20; font-size: 22px; }
.queue-toolbar {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 14px;
}
.queue-search-panel {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px;
}
.queue-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(112px, .8fr) minmax(130px, .9fr) auto;
  align-items: end;
  gap: 8px;
  width: 100%;
}
.queue-filter-field { display: grid; gap: 5px; min-width: 0; }
.queue-filter-field > span { color: #646d78; font-size: 10px; font-weight: 800; }
.queue-filter-field input,
.queue-filter-field select { min-width: 0; min-height: 38px; margin: 0; padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
.queue-filter-submit {
  min-height: 38px;
  margin-left: 0;
  padding: 8px 13px;
  border-color: #e60012;
  background: #e60012;
  color: #fff;
  font-size: 12px;
}
.queue-filter-submit:hover { border-color: #c90010; background: #c90010; color: #fff; }
.queue-filter-reset { align-self: center; color: #68717c; font-size: 12px; font-weight: 750; }
.queue-next-action {
  display: flex;
  align-items: center;
  flex: 0 0 210px;
  padding-left: 14px;
  border-left: 1px solid #d9dde3;
}
.queue-next-action .primary { width: 100%; min-height: 42px; padding: 9px 13px; font-size: 12px; line-height: 1.3; }
.queue-list {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
}
.queue-list-heading { padding: 14px 18px; background: #f6f7f9; }
.queue-list-heading > div { display: flex; align-items: baseline; gap: 10px; }
.queue-list-heading h2 { margin: 0; }
.queue-list-heading span { color: #e60012; font-size: 13px; font-weight: 900; }
.queue-company-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 11px 18px;
  border-top: 1px solid #e7eaee;
}
.queue-company-row.is-current { box-shadow: inset 4px 0 #e60012; background: #fff7f8; }
.queue-company-identity { display: grid; gap: 5px; min-width: 0; }
.queue-company-identity strong { overflow-wrap: anywhere; font-size: 13px; }
.queue-company-identity span,
.queue-company-state { color: #69727e; font-size: 11px; }
.queue-company-row form { margin: 0; }
.queue-company-row button { min-height: 36px; padding: 7px 13px; }
.queue-company-open { min-height: 36px; padding: 7px 13px; text-decoration: none; }

/* Manager assigned database */
.assigned-base-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.assigned-base-head h1 { margin: 0 0 5px; }
.assigned-base-head p { margin: 0; color: #68717c; }
.assigned-base-head > a { flex: 0 0 auto; text-decoration: none; }
.assigned-base-filter-group {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.assigned-base-filter-section {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
}
.assigned-base-filter-section h2 {
  margin: 0;
  padding: 10px 14px 0;
  color: #68717c;
  font-size: 11px;
  font-weight: 800;
}
.assigned-base-filter-row {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}
.assigned-base-filter {
  display: grid;
  flex: 1 0 150px;
  gap: 6px;
  min-width: 150px;
  padding: 11px 14px 13px;
  border-bottom: 3px solid transparent;
  color: #4f5864;
  text-decoration: none;
}
.assigned-base-filter + .assigned-base-filter { border-left: 1px solid #e5e8ec; }
.assigned-base-filter.active { border-bottom-color: #e60012; background: #fff6f7; color: #b00011; }
.assigned-base-filter span { font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.assigned-base-filter strong { color: #171b20; font-size: 20px; }
.assigned-base-search {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
}
.assigned-base-search form {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(150px, 210px) minmax(180px, 240px) minmax(150px, 210px) max-content max-content;
  align-items: end;
  gap: 10px;
}
.assigned-base-search label { display: grid; gap: 6px; color: #646d78; font-size: 11px; font-weight: 800; }
.assigned-base-search input,
.assigned-base-search select,
.assigned-base-search textarea { min-height: 44px; margin: 0; }
.assigned-base-search textarea { width: 100%; min-width: 0; resize: vertical; }
.assigned-base-search .queue-filter-submit {
  width: auto;
  min-width: 88px;
  min-height: 44px;
  padding: 11px 18px;
  font-size: 14px;
}
.assigned-base-search form > a { align-self: center; color: #68717c; font-size: 12px; font-weight: 750; }
.assigned-base-search-report { display: grid; gap: 4px; max-width: 860px; margin-top: 9px; color: #59636f; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.assigned-base-search-report strong { color: #242a31; }
.assigned-base-bulk {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
}
.assigned-base-bulk > strong { align-self: center; min-width: 86px; font-size: 12px; }
.assigned-base-bulk label { display: grid; gap: 5px; min-width: 190px; }
.assigned-base-bulk label > span { color: #68717c; font-size: 10px; font-weight: 800; }
.assigned-base-bulk select,
.assigned-base-bulk input,
.assigned-base-bulk button { min-height: 38px; margin: 0; }
.assigned-base-bulk button { width: auto; }
.assigned-base-bulk-extra[hidden] { display: none; }
.assigned-base-list-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.assigned-base-select-all { display: inline-flex; align-items: center; gap: 7px; color: #5f6874; font-size: 11px; font-weight: 750; }
.assigned-base-select-all input,
.assigned-base-row-check { width: 18px; height: 18px; margin: 0; accent-color: #e60012; }
.assigned-base-company-row {
  display: grid;
  grid-template-columns: 22px minmax(230px, 1.4fr) minmax(190px, 1fr) minmax(115px, .6fr) minmax(145px, .75fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 12px 18px;
  border-top: 1px solid #e7eaee;
}
.assigned-base-list { overflow: visible; }
.assigned-base-company-field { display: grid; gap: 4px; min-width: 0; }
.assigned-base-company-field span { color: #69727e; font-size: 10px; font-weight: 750; }
.assigned-base-company-field strong { overflow-wrap: anywhere; font-size: 12px; }
.assigned-base-company-field small { color: #69727e; font-size: 10px; overflow-wrap: anywhere; }
.assigned-base-priority { color: #b00011 !important; font-weight: 800; }
.assigned-base-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.assigned-base-tags span { padding: 3px 6px; border: 1px solid transparent; border-radius: 4px; font-size: 9px; font-weight: 800; }
.assigned-base-tags small { color: #8a929c; font-size: 9px; }
.company-tag-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-tag-badge.tag-tone-1 { border-color: #a9c9ef; background: #e8f3ff; color: #075fac; }
.company-tag-badge.tag-tone-2 { border-color: #b9ddca; background: #e9f7ef; color: #177148; }
.company-tag-badge.tag-tone-3 { border-color: #e6c9a8; background: #fff2e5; color: #9a5416; }
.company-tag-badge.tag-tone-4 { border-color: #d3c2eb; background: #f2ebfb; color: #69429a; }
.company-tag-badge.tag-tone-5 { border-color: #edbdc3; background: #fff0f2; color: #a43b49; }
.company-tag-badge.tag-tone-6 { border-color: #b9d8d5; background: #e9f6f5; color: #176d68; }
.company-tag-badge.tag-tone-origin { border-color: #d7c49a; background: #f5ecd8; color: #73591f; }
.company-tag-overflow { position: relative; }
.company-tag-overflow summary { display: grid; width: 24px; min-height: 20px; padding: 0; place-items: center; border: 1px solid #cbd3dc; border-radius: 4px; background: #fff; color: #56616d; cursor: pointer; font-size: 12px; font-weight: 850; list-style: none; }
.company-tag-overflow summary::-webkit-details-marker { display: none; }
.company-tag-overflow-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: flex; min-width: 150px; max-width: 280px; padding: 7px; flex-wrap: wrap; gap: 4px; border: 1px solid #d8dde3; border-radius: 6px; background: #fff; box-shadow: 0 8px 22px rgba(26, 33, 40, .14); }
.assigned-base-holding { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin-top: 5px; color: #46515d; font-size: 9px; }
.assigned-base-holding > span { color: #8a6200; font-weight: 850; }
.assigned-base-holding > strong { color: #242a31; font-size: 10px; }
.assigned-base-holding > small { color: #69727e; }
.assigned-base-split-action { position: relative; display: grid; grid-template-columns: auto 34px; align-items: stretch; }
.assigned-base-split-action > a { min-height: 36px; border-radius: 6px 0 0 6px; text-decoration: none; }
.assigned-base-split-action > details { position: relative; }
.assigned-base-split-action summary {
  display: grid;
  width: 34px;
  height: 100%;
  min-height: 36px;
  place-items: center;
  border: 1px solid #cfd5dc;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #fff;
  color: #333b44;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 900;
}
.assigned-base-split-action summary::-webkit-details-marker { display: none; }
.assigned-base-action-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: min(310px, calc(100vw - 40px));
  gap: 7px;
  padding: 12px;
  border: 1px solid #d6dbe1;
  border-radius: 7px;
  box-shadow: 0 12px 30px rgb(22 29 37 / 16%);
  background: #fff;
}
.assigned-base-action-menu > strong { padding: 0 4px 3px; font-size: 11px; }
.assigned-base-action-menu form { margin: 0; }
.assigned-base-action-menu button { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid #d9dde2; background: #fff; color: #242a31; text-align: left; }
.assigned-base-menu-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.assigned-base-menu-form input,
.assigned-base-menu-form select { min-width: 0; min-height: 34px; margin: 0; padding: 6px 8px; font-size: 11px; }
.assigned-base-menu-form button { width: auto; }
.assigned-base-empty { padding: 34px 18px; border-top: 1px solid #e7eaee; color: #68717c; text-align: center; }
.assigned-base-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px 0 4px;
  color: #68717c;
  font-size: 12px;
}
.assigned-base-pagination a { color: #b00011; font-weight: 750; }
.company-tag-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
}
.company-tag-toolbar > div:first-child { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.company-tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.company-tag-list span { padding: 4px 7px; border: 1px solid transparent; border-radius: 4px; font-size: 10px; font-weight: 800; }
.company-tag-list small { color: #7a838e; }
.company-tag-toolbar form { display: flex; gap: 6px; margin: 0; }
.company-tag-toolbar input,
.company-tag-toolbar select,
.company-tag-toolbar button { width: auto; min-height: 36px; margin: 0; padding: 7px 10px; font-size: 11px; }

@media (max-width: 900px) {
  .assigned-base-head { align-items: flex-start; flex-direction: column; }
  .assigned-base-search form { grid-template-columns: 1fr 1fr auto; }
  .assigned-base-search form > a { grid-column: 1 / -1; }
  .assigned-base-bulk { align-items: stretch; flex-wrap: wrap; }
  .assigned-base-company-row { grid-template-columns: 22px 1fr 1fr; }
  .assigned-base-split-action { justify-self: start; }
}
@media (max-width: 620px) {
  .assigned-base-search form { grid-template-columns: 1fr; }
  .assigned-base-search form > a { grid-column: 1; }
  .assigned-base-list-heading { grid-template-columns: 1fr auto; }
  .assigned-base-list-heading > small { grid-column: 1 / -1; }
  .assigned-base-company-row { grid-template-columns: 22px 1fr; gap: 10px; }
  .assigned-base-company-row > :not(.assigned-base-row-check) { grid-column: 2; }
  .company-tag-toolbar { align-items: stretch; flex-direction: column; }
  .company-tag-toolbar > div:first-child { margin-right: 0; }
  .company-tag-toolbar form { display: grid; grid-template-columns: 1fr auto; }
}

/* Manual company and password forms */
.manual-company-shell { width: min(960px, 100%); margin: 0 auto; }
.manual-company-head { margin-bottom: 14px; }
.manual-company-head p { margin: 0; color: #68717c; }
.manual-company-modes { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid #dfe3e8; border-radius: 7px; background: #fff; }
.manual-company-mode { min-height: 42px; padding: 9px 16px; border: 0; border-radius: 5px; background: transparent; color: #5d6672; font: inherit; font-weight: 700; cursor: pointer; }
.manual-company-mode.active { background: #fdebec; color: #bc0014; }
.manual-company-form { display: grid; gap: 16px; padding: 20px; }
.manual-company-form > label,
.manual-company-grid label,
.manual-inn-row label,
.password-change label { display: grid; gap: 6px; color: #303740; font-size: 12px; font-weight: 750; }
.manual-inn-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; }
.manual-company-form input,
.manual-company-form select,
.manual-company-form textarea { margin: 0; }
.manual-company-form > .primary { justify-self: start; }
.manual-company-history-actions { display: flex; align-items: center; gap: 10px; }
.manual-lookup-message {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin: 0;
  padding: 14px 16px;
  border: 2px solid #dfe3e8;
  border-radius: 7px;
  background: #f8f9fa;
  color: #4f5864;
}
.manual-lookup-message[hidden] { display: none; }
.manual-lookup-message__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}
.manual-lookup-message__copy { display: grid; gap: 3px; min-width: 0; }
.manual-lookup-message__copy strong { font-size: 15px; color: currentColor; }
.manual-lookup-message__copy span { font-size: 12px; font-weight: 700; }
.manual-lookup-message.is-existing,
.manual-lookup-message.is-error { border-color: #e60012; background: #fff1f2; color: #b00014; }
.manual-lookup-message.is-new { border-color: #35a868; background: #effaf4; color: #176d3d; }
.manual-lookup-message.is-pending { grid-template-columns: minmax(0, 1fr); border-width: 1px; }
.manual-lookup-message.is-pending .manual-lookup-message__icon { display: none; }
.manual-existing-action { padding-top: 2px; }
.manual-existing-action[hidden] { display: none; }
.manual-existing-action button { min-height: 46px; }
.manual-company-form fieldset { margin: 0; padding: 18px; border: 1px solid #dfe3e8; border-radius: 7px; }
.manual-company-form fieldset[hidden] { display: none; }
.manual-assignee-picker legend { padding: 0 6px; color: #303740; font-size: 12px; font-weight: 800; }
.manual-assignee-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.manual-assignee-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #e1e5ea;
  border-radius: 6px;
  background: #fff;
  color: #303740;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.manual-assignee-option:hover { border-color: #bfc6cf; background: #f8f9fa; }
.manual-assignee-option:has(input:checked) { border-color: #e60012; background: #fff3f4; }
.manual-assignee-option input { width: 18px; height: 18px; flex: 0 0 auto; }
.manual-assignee-option--all { width: fit-content; min-width: 210px; }
.manual-company-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.manual-company-grid .wide { grid-column: 1 / -1; }
.required-field-label b { color: #e60012; font-size: 14px; }
.password-change { width: min(540px, 100%); margin: 0 auto; padding: 24px; }
.password-change p { color: #68717c; }
.password-change form { display: grid; gap: 15px; }
.password-change ul { margin: 4px 0 0; padding-left: 18px; color: #69717d; font-size: 11px; }
.field-error { color: #b00011; font-size: 11px; }

/* Compact activity summaries with one common disclosure control. */
.activity-step-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 126px;
}

/* Activity cards use all available workspace width. BPM keeps its compact
   working width because it does not contain a multi-step horizontal grid. */
.activity-card-list {
  grid-template-columns: minmax(0, 1fr);
  width: min(980px, 100%);
  align-items: start;
}
.access-card-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 960px), 960px));
  align-items: start;
}
.activity-card { width: 100%; min-width: 0; }
.activity-group-card { --record-card-collapsed-height: 0px; }
.activity-card-header,
.access-card-header { min-height: 76px; }
.activity-card-header {
  min-height: 60px;
  padding: 10px 14px;
}
.activity-card-company .activity-company-link,
.activity-card-company > strong,
.access-card-company .activity-company-link,
.access-card-company > strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.activity-step-summary-row { min-height: 68px; height: auto; }
.activity-step-fields { grid-template-columns: 1fr; }
.activity-step-fields > div,
.activity-step-fields > div + div {
  padding: 9px 0;
  border-top: 1px solid rgba(93, 102, 113, .13);
  border-left: 0;
}
.activity-step-fields > div:first-child { border-top: 0; }
.access-card-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.access-card-field:nth-child(n + 4) { border-top: 1px solid rgba(93, 102, 113, .13); }
.access-card-field:nth-child(4) { padding-left: 0; border-left: 0; }
.access-card.is-collapsible:not(.is-expanded) .record-card-expandable { height: 108px; }
.activity-step-summary {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 9px 14px 10px;
}
.activity-step-summary + .activity-step-summary { border-left: 1px solid rgba(93, 102, 113, .13); }
.activity-step-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.activity-step-summary-heading > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
}
.activity-step-summary-heading > div > span { color: #b00011; font-size: 11px; font-weight: 850; }
.activity-step-summary-heading strong { font-size: 12px; }
.activity-step-summary p {
  margin: 0;
  color: #4f5864;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.activity-step-summary-outcome {
  display: grid;
  grid-template-columns: auto minmax(110px, 190px);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: #68717c;
  font-size: 11px;
  font-weight: 750;
}
.activity-step-summary-outcome select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 34px 6px 10px;
  border-color: #cfd5dc;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, .82);
  font-size: 12px;
}
.activity-group-card.is-expanded .activity-step-summary-row { border-bottom: 1px solid rgba(93, 102, 113, .13); }
.activity-group-card .record-card-toggle {
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, .9);
}
.activity-group-card .record-card-toggle:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, .78);
}
.activity-toggle-chevrons {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 24px;
  height: 10px;
  gap: 0;
}
.activity-toggle-chevrons i {
  display: block;
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  margin: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@media (max-width: 1100px) {
  .queue-view-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .queue-view-tabs a:nth-child(3n + 1) { border-left: 0; }
  .queue-view-tabs a:nth-child(n + 4) { border-top: 1px solid #e5e8ec; }
  .activity-step-list { grid-template-columns: 1fr; }
  .activity-step + .activity-step { border-top: 1px solid rgba(93, 102, 113, .16); border-left: 0; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .queue-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .queue-filter-submit { margin-left: 0; }
  .queue-next-action {
    flex-basis: auto;
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid #d9dde3;
    border-left: 0;
  }
  .queue-next-action .primary { width: min(100%, 260px); }
}
@media (max-width: 700px) {
  .user-password-link { display: none; }
  .user-name,
  .notification-dot { display: none; }
  .topbar { gap: 8px; padding-inline: 10px; }
  .topbar-title { min-width: 0; gap: 9px; }
  .topbar-title strong { overflow-wrap: anywhere; font-size: 13px; }
  .queue-page-head,
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .queue-view-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-view-tabs a:nth-child(n) { border-left: 1px solid #e5e8ec; }
  .queue-view-tabs a:nth-child(odd) { border-left: 0; }
  .queue-view-tabs a:nth-child(n + 3) { border-top: 1px solid #e5e8ec; }
  .queue-company-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .queue-company-state { grid-column: 1; }
  .queue-company-row form { grid-column: 2; grid-row: 1 / span 2; }
  .queue-company-open { grid-column: 2; grid-row: 1 / span 2; }
  .queue-filter-form { grid-template-columns: 1fr; }
  .manual-inn-row,
  .manual-company-grid { grid-template-columns: 1fr; }
  .manual-company-grid .wide { grid-column: 1; }
  .manual-company-modes { display: grid; grid-template-columns: 1fr; width: 100%; }
  .manual-company-mode { width: 100%; }
  .manual-company-form { padding: 14px; }
  .manual-assignee-list { grid-template-columns: 1fr; }
  .manual-assignee-option--all { width: 100%; min-width: 0; }
  .activity-step-summary-row { grid-template-columns: 1fr; }
  .activity-step-summary-row { height: auto; }
  .activity-group-card { --record-card-collapsed-height: 0px; }
  .activity-step-summary + .activity-step-summary { border-top: 1px solid rgba(93, 102, 113, .13); border-left: 0; }
}

/* Unified CRM analytics */
.analytics-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.analytics-heading h1 { margin: 2px 0 5px; font-size: 28px; }
.analytics-heading p { max-width: 850px; margin: 0; color: #68717c; font-size: 13px; }
.analytics-eyebrow { color: #d90012; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.analytics-freshness { display: grid; gap: 3px; text-align: right; }
.analytics-freshness span { color: #7a838e; font-size: 10px; font-weight: 750; }
.analytics-freshness strong { font-size: 12px; }
.analytics-page-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.analytics-filter-panel { min-width: 0; }
.analytics-report-content { min-width: 0; }
.analytics-filterbar { display: grid; grid-template-columns: 1fr; gap: 13px; align-items: end; padding: 16px; border: 1px solid #dce1e7; border-radius: 6px; background: #fff; }
.analytics-filterbar > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 4px; }
.analytics-filterbar > header strong { color: #252b33; font-size: 14px; }
.analytics-filterbar > header a { color: #2d73e8; font-size: 10px; font-weight: 800; text-decoration: none; }
.analytics-filterbar > label { display: grid; gap: 5px; color: #626c78; font-size: 10px; font-weight: 800; }
.analytics-filterbar input, .analytics-filterbar select, .analytics-pivot-config select { min-height: 38px; margin: 0; padding: 8px 10px; border-color: #d6dce3; border-radius: 5px; font-size: 12px; }
.analytics-filterbar > button, .analytics-pivot-config > button, .analytics-export-form button { min-height: 40px; padding: 8px 16px; border: 1px solid #e60012; border-radius: 5px; background: #fff; color: #c60012; font-size: 12px; font-weight: 850; cursor: pointer; }

/* Unified Activities + company history */
.activities-page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  color: #202936;
  font: 14px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.work-section-planner .workspace > *,
.work-section-processing .workspace > *,
.work-section-bpm .workspace > *,
.work-section-statistics .workspace > * {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}
.activities-page button,
.activities-page input,
.activities-page select,
.activities-page textarea { font-family: inherit; letter-spacing: 0; }
.activities-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.activities-heading h1 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.activities-period-controls { display: grid; grid-template-columns: repeat(2, 142px); gap: 10px; align-items: end; }
.activities-period-controls label { display: grid; gap: 5px; color: #647083; font-size: 11px; font-weight: 750; line-height: 1.4; }
.activities-period-controls input { width: 100%; min-height: 38px; margin: 0; padding: 9px 11px; border: 1px solid #d4dbe5; border-radius: 5px; background: #fff; color: #303947; font-size: 12px; line-height: 1.4; }
.activities-view-switcher { display: inline-flex; align-items: center; padding: 3px; border: 1px solid #d7dee7; border-radius: 6px; background: #fff; }
.activities-view-switcher button { min-height: 30px; padding: 6px 10px; border: 0; border-radius: 4px; background: transparent; color: #687485; font-size: 11px; font-weight: 750; line-height: 1.4; cursor: pointer; }
.activities-view-switcher button[aria-pressed="true"] { background: #eaf2fc; color: #245faa; box-shadow: inset 0 0 0 1px #b9d0ed; }
.activities-filterbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(180px, .8fr) 150px 150px auto 38px;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
}
.activities-filterbar.is-personal { grid-template-columns: minmax(260px, 1fr) 150px 150px auto 38px; }
.activities-filterbar.activities-reflow-filterbar,
.activities-filterbar.activities-reflow-filterbar.is-personal { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.activities-filter-primary { display: flex; align-items: end; gap: 10px; min-width: 0; }
.activities-filter-primary > .activities-company-search { flex: 0 1 620px; width: 100%; max-width: 620px; min-width: 0; }
.activities-filter-primary > .activities-company-search-control { flex: 0 1 620px; width: 100%; max-width: 620px; min-width: 0; }
.activities-company-search-control > .activities-company-search { width: 100%; max-width: none; }
.activities-filter-primary > .activities-multiselect { flex: 0 1 320px; width: min(320px, 100%); }
.activities-filter-primary > .activities-filter-reset { flex: 0 0 38px; }
.activities-reflow-filterbar .activities-extra-filter > div { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.crm-list-filterbar {
  grid-template-columns: minmax(360px, 620px) auto minmax(0, 1fr);
  width: 100%;
  margin-bottom: 14px;
}
@media (min-width: 1101px) {
  .activities-reflow-filterbar .activities-filter-row-start { grid-column: 1; }
  .crm-list-filterbar > .activities-filter-reset { grid-column: 3; justify-self: end; }
}
.crm-list-filterbar > .crm-list-mine-filter {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  color: #3d4755;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.crm-list-mine-filter input { width: 16px; min-height: 16px; margin: 0; accent-color: #2a70dd; }
.crm-list-filterbar .activities-extra-filter > div {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}
.activities-filterbar > label { display: grid; gap: 5px; color: #647083; font-size: 11px; font-weight: 750; line-height: 1.4; }
.activities-filterbar input,
.activities-filterbar summary { min-height: 38px; margin: 0; padding: 9px 11px; border: 1px solid #d4dbe5; border-radius: 5px; background: #fff; color: #303947; font-size: 12px; line-height: 1.4; }
.activities-filterbar > .activities-filter-submit { min-height: 38px; padding: 8px 14px; border: 1px solid #e60012; border-radius: 5px; background: #e60012; color: #fff; font-size: 12px; font-weight: 750; line-height: 1.4; cursor: pointer; }
.activities-filterbar > .activities-filter-submit:hover { border-color: #c90010; background: #c90010; }
.activities-filter-reset { align-self: end; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #d4dbe5; border-radius: 5px; background: #fff; color: #657286; }
.activities-filter-reset:hover { border-color: #9fb5d1; color: #245f9f; }
.activities-filter-reset img { width: 17px; height: 17px; }
.crm-search-submit-control { position: relative; width: 100%; min-width: 0; }
.crm-search-submit-control > input { display: block; width: 100%; padding-right: 72px; }
.crm-search-submit-button {
  position: absolute;
  top: 50%;
  right: 4px;
  z-index: 1;
  min-width: 58px;
  min-height: 30px;
  margin: 0;
  padding: 5px 9px;
  transform: translateY(-50%);
  border: 1px solid #d7dde5;
  border-radius: 4px;
  background: #eef1f4;
  color: #4f5b6b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}
.crm-search-submit-button:hover { border-color: #bdc6d1; background: #e3e7ec; color: #303947; }
.crm-search-submit-button:focus-visible { outline: 2px solid #2a70dd; outline-offset: 1px; }
.crm-search-field .crm-search-submit-control { min-width: 0; }
.crm-search-field .crm-search-submit-control > input { padding-right: 72px; }
.activities-multiselect { position: relative; }
.activities-multiselect summary { overflow: hidden; list-style: none; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.activities-multiselect summary::-webkit-details-marker { display: none; }
.activities-multiselect > div { position: absolute; top: calc(100% + 5px); left: 0; z-index: 12; display: grid; min-width: 250px; max-height: 280px; padding: 7px; overflow-y: auto; border: 1px solid #d4dbe5; border-radius: 6px; background: #fff; box-shadow: 0 14px 32px rgba(27, 37, 49, .16); }
.activities-multiselect label { display: flex; align-items: center; gap: 8px; padding: 8px; color: #303947; font-size: 12px; cursor: pointer; }
.activities-multiselect input { width: 16px; min-height: 16px; padding: 0; }
.activities-extra-filter { grid-column: 1 / -1; min-width: 0; margin: 0 -13px -13px; }
.activities-extra-filter > summary { position: relative; display: grid; place-items: center; min-height: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; list-style: none; cursor: pointer; }
.activities-extra-filter > summary::-webkit-details-marker { display: none; }
.activities-extra-filter > summary::before { position: absolute; top: 50%; right: 13px; left: 13px; height: 1px; background: #e3e8ee; content: ""; }
.activities-extra-filter > summary i { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: -4px; border-right: 1.5px solid #667386; border-bottom: 1.5px solid #667386; background: #fff; box-shadow: 0 0 0 8px #fff; transform: rotate(45deg); }
.activities-extra-filter[open] > summary i { margin-top: 4px; transform: rotate(225deg); }
.activities-extra-filter > div { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 10px; padding: 10px 13px 13px; background: #f8f9fb; }
.work-funnel-filterbar .activities-extra-filter > div { grid-template-columns: repeat(4, minmax(160px, 1fr)); }

.activity-date-buckets { position: relative; display: grid; gap: 14px; }
.activity-list-toolbar { position: static; z-index: 2; display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 36px; }
.activities-sort-control { display: flex; align-items: center; gap: 9px; padding: 3px 4px 3px 10px; border: 1px solid #d6dee8; border-radius: 6px; background: #f8fafc; color: #566274; font-size: 11px; font-weight: 800; box-shadow: 0 1px 2px rgba(31, 43, 58, .04); }
.activities-sort-control select { width: 212px; min-height: 30px; margin: 0; padding: 5px 27px 5px 9px; border: 1px solid #bdc8d6; border-radius: 5px; background-color: #fff; color: #344054; font-size: 11px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.activities-view-control { display: flex; align-items: center; gap: 9px; padding: 3px 4px 3px 10px; border: 1px solid #d6dee8; border-radius: 6px; background: #f8fafc; color: #566274; font-size: 11px; font-weight: 800; box-shadow: 0 1px 2px rgba(31, 43, 58, .04); }
.activities-view-control .activities-view-switcher { padding: 0; border-color: #bdc8d6; }
.activity-date-bucket { min-width: 0; }
.activity-date-bucket > summary { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 3px 1px; border: 0; background: transparent; color: #283140; font-size: 14px; font-weight: 750; line-height: 1.4; list-style: none; cursor: pointer; }
.activity-date-bucket > summary::-webkit-details-marker { display: none; }
.activity-date-bucket > summary i { width: 7px; height: 7px; margin-top: -3px; border-right: 1.5px solid #667386; border-bottom: 1.5px solid #667386; transform: rotate(45deg); }
.activity-date-bucket[open] > summary i { transform: rotate(225deg); }
.activity-history-list { display: grid; gap: 24px; padding: 12px 0 6px; }
.activity-history-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .62fr); gap: 12px; align-items: start; min-width: 0; }
.activity-shell,
.activity-history-panel { min-width: 0; min-height: 620px; overflow: hidden; border: 1px solid #cfd8e3; border-radius: 7px; background: #fff; box-shadow: 0 2px 5px rgba(31, 43, 58, .06); }
.activity-shell { position: relative; width: 100%; }
.activity-history-workspace.is-card-collapsed .activity-shell,
.activity-history-workspace.is-card-collapsed .activity-history-panel {
  height: 320px;
  min-height: 320px;
}

.activity-status-model { display: grid; grid-template-columns: repeat(5, minmax(104px, 1fr)); height: 49px; min-height: 49px; overflow-x: auto; border-bottom: 1px solid #dce2e9; background: #f8f9fb; }
.activity-status-button { position: relative; min-width: 96px; height: 49px; min-height: 49px; padding: 10px 8px 7px; overflow-wrap: anywhere; border: 0; border-right: 1px solid #e8ecf0; border-radius: 0; background: transparent; color: #687485; font-size: 12px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.activity-status-button::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--activity-status-color, #8792a2); content: ""; opacity: .28; }
.activity-status-button.is-active { background: #fff; color: #202938; box-shadow: inset 0 -3px 0 var(--activity-status-color, #8792a2); }
.activity-status-button.is-active::before { opacity: 1; }
.activity-status-button.is-complete { background: #f1f3f5; color: #8a94a2; }
.activity-status-button:disabled { cursor: default; }
.status-interest { --activity-status-color: #3478d4; }
.status-new { --activity-status-color: #8a96a6; }
.status-proposal { --activity-status-color: #d99417; }
.status-pilot_agreement { --activity-status-color: #7a56ba; }
.status-sales { --activity-status-color: #269268; }
.status-closed { --activity-status-color: #df2438; }

.activity-company-card { position: relative; padding: 0 18px 50px; }
.activity-company-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 8px -18px 14px; padding: 8px 18px; border: 0; border-bottom: 1px solid #e1e6ec; background: #f7f9fb; }
.activity-company-heading > div { min-width: 0; }
.activity-company-identity { display: grid; gap: 4px; }
.activity-company-heading a,
.activity-company-heading strong { width: fit-content; max-width: 100%; color: #202936; font-size: 16px; font-weight: 700; line-height: 1.4; text-decoration: none; }
.activity-company-heading span { color: #748092; font-size: 12px; font-weight: 400; line-height: 1.4; }
.activity-company-compact-step { display: none; }
.activity-collapsed-summary { display: none; border-top: 0; }
.is-card-collapsed .activity-company-card { padding: 0 18px 50px; }
.is-card-collapsed .activity-company-heading { margin-bottom: 8px; }
.is-card-collapsed .activity-collapsed-summary { display: grid; }
.activity-summary-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 47px; padding: 7px 0; border-bottom: 1px solid #e7ebf0; }
.activity-collapsed-summary .activity-summary-row:last-child { border-bottom: 0; }
.activity-summary-row time { display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: baseline; min-width: 0; padding: 5px 9px; border-left: 3px solid #aab3bf; background: #f3f5f7; color: #5f6b7b; font-variant-numeric: tabular-nums; }
.activity-summary-row time b { font-size: 14px; text-transform: lowercase; }
.activity-summary-row time span { font-size: 12px; font-weight: 650; }
.activity-summary-row > div { display: grid; min-width: 0; gap: 2px; padding: 0; }
.activity-summary-row small { display: block; margin: 0; color: #748092; font-size: 11px; font-weight: 750; }
.activity-summary-row p { margin: 0; overflow: hidden; color: #202936; font-size: 14px; font-weight: 800; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.activity-summary-row.is-last p { color: #667283; font-weight: 600; }
.activity-summary-row.is-next time { border-left-color: #3478d4; background: #eef5fc; color: #245b9e; }
.activity-summary-row.activity-date-overdue time { border-left-color: #d5283d; background: #fff0f2; color: #b0182b; }
.activity-summary-row.activity-date-today time { border-left-color: #b47b00; background: #fff8df; color: #795500; }
.activity-expanded-content { display: block; padding: 0; }
.is-card-collapsed .activity-expanded-content { display: none; }
.activity-step-navigation { width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 0; background: transparent; box-sizing: border-box; }
.activity-steps-title { margin: 0 0 10px; color: #4c5868; font-size: 13px; font-weight: 750; }

.activity-step-carousel { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 7px; align-items: stretch; }
.activity-step-tabs { display: flex; gap: 7px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.activity-step-tabs::-webkit-scrollbar { display: none; }
.activity-step-arrow { display: grid; place-items: center; width: 32px; min-height: 86px; padding: 0; border: 1px solid #d3dae3; border-radius: 5px; background: #fff; color: #5f6c7d; font-size: 24px; line-height: 1; }
.activity-step-tab { display: grid; flex: 0 0 calc((100% - 14px) / 3); align-content: center; gap: 5px; min-width: 0; min-height: 86px; padding: 10px; border: 1px solid #dce2e9; border-radius: 6px; background: #fff; color: #202936; text-align: left; cursor: pointer; }
.activity-step-tab time { color: #687485; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.activity-step-tab strong { overflow: hidden; font-size: 14px; font-weight: 750; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.activity-step-tab.is-active { border-color: #8eb2e7; background: #f5f9ff; box-shadow: inset 0 -3px 0 #2868c7; }
.activity-step-tab.activity-date-overdue time { color: #b3192d; }
.activity-step-tab.activity-date-today time { color: #7b5900; }
.activity-step-detail { display: none; gap: 10px; margin-top: 16px; }
.activity-step-detail.is-active { display: grid; }
.activity-step-detail,
.activity-current-step,
.activity-result-panel,
.activity-next-step-section,
.activity-new-step-form { width: 100%; min-width: 0; box-sizing: border-box; }

.activity-current-step,
.activity-result-panel,
.activity-new-step-form { overflow: hidden; border: 1px solid #d9e0e9; border-radius: 6px; }
.activity-current-step { background: #fff8ec; border-color: #ead7b4; }
.activity-current-step.activity-date-overdue { background: #fff2f3; border-color: #efc2c8; }
.activity-current-step > header { padding: 12px 14px; border-bottom: 1px solid #e1e6ec; }
.activity-current-step > header > span { display: block; margin: 0 0 5px; color: #748092; font-size: 11px; font-weight: 750; text-transform: uppercase; }
.activity-current-step h3 { max-width: 42ch; margin: 0; color: #202936; font-size: 14px; font-weight: 700; line-height: 1.45; }
.activity-current-step dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; row-gap: 20px; margin: 0; padding: 14px 16px 16px; }
.activity-current-step dl div { min-width: 0; padding: 0; border: 0; }
.activity-current-step dl div:nth-child(even) { border: 0; }
.activity-current-step dt { margin: 0 0 5px; padding: 0; border: 0; color: #748092; font-size: 11px; font-weight: 750; text-transform: uppercase; }
.activity-current-step dd { margin: 0; padding: 0; border: 0; color: #202936; font-size: 14px; }

.activity-result-panel { display: grid; gap: 10px; padding: 12px 14px 14px; background: #f7f9fb; border-color: #dce2e9; }
.activity-result-error { margin: 0; padding: 9px 11px; border: 1px solid #efb9c0; border-radius: 5px; background: #fff1f3; color: #a91528; font-size: 13px; font-weight: 700; line-height: 1.4; }
.activity-result-error[hidden] { display: none; }
.activity-result-panel h3,
.activity-new-step-form h3 { margin: 0 0 10px; color: #243043; font-size: 13px; font-weight: 800; }
.activity-result-panel > label,
.activity-result-fields,
.activity-new-step-form > label,
.activity-new-step-form .split label { display: grid; gap: 4px; color: #596678; font-size: 11px; font-weight: 750; }
.activity-processing-result { grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; }
.activity-result-panel select,
.activity-result-panel input,
.activity-result-panel textarea,
.activity-new-step-form select,
.activity-new-step-form input,
.activity-new-step-form textarea { width: 100%; min-height: 36px; margin: 0; padding: 7px 9px; border: 1px solid #cfd7e1; border-radius: 5px; background: #fff; color: #202936; }
.activity-result-panel textarea,
.activity-new-step-form textarea { min-height: 62px; resize: vertical; }
.activity-result-panel select,
.activity-result-panel input,
.activity-result-panel textarea,
.activity-new-step-form select,
.activity-new-step-form input,
.activity-new-step-form textarea { font-size: 14px; font-weight: 400; line-height: 1.4; }
.activity-result-actions,
.activity-new-step-actions { display: flex; justify-content: flex-end; gap: 7px; padding-top: 4px; }
.activity-result-actions button,
.activity-new-step-actions button { min-height: 38px; padding: 9px 13px; border: 1px solid #b8ddc8; border-radius: 5px; background: #dff4e7; color: #126b3d; font-size: 14px; font-weight: 750; cursor: pointer; }
.activity-next-step-section { display: grid; gap: 10px; padding: 0; }
.activity-result-next-step { margin-top: 2px; padding-top: 10px; border-top: 1px solid #e1e6ec; }
.activity-result-next-step[hidden] { display: none; }
.activity-result-next-step .activity-new-step-form { margin-top: 0; }
.activity-result-next-step .activity-new-step-form header small { color: #748092; font-size: 10px; font-weight: 650; }
.activity-next-step-section > .add-next-step-button { justify-self: start; min-height: 34px; margin: 0; padding: 7px 12px; border-color: #df2438; border-radius: 6px; background: #fff; color: #c40016; font-size: 12px; font-weight: 750; line-height: 1.4; }
.activity-new-step-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; background: #eef5fc; border-color: #c7d9ed; }
.activity-new-step-form[hidden] { display: none; }
.activity-new-step-form header { display: flex; grid-column: 1 / 3; align-items: center; justify-content: space-between; gap: 10px; }
.activity-new-step-form header h3 { margin: 0; }
.activity-new-step-form .split,
.activity-new-step-form > label,
.activity-new-step-actions { grid-column: 1 / 3; }
.activity-new-step-form header button { width: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; color: #df0018; font-size: 26px; }
.friendly-datetime { display: grid; grid-template-columns: 132px 78px; justify-content: start; gap: 10px; }
.friendly-datetime input[type="text"] { width: 78px; text-align: center; font-variant-numeric: tabular-nums; }

.activity-card-toggle-row { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 5px 0; border-top: 1px solid #e1e6ec; background: #f8fafc; }
.activity-card-toggle { display: grid; place-items: center; width: 48px; min-height: 28px; padding: 0; border: 1px solid #cfd8e3; border-radius: 5px; background: #fff; color: #526174; box-shadow: 0 1px 2px rgba(31, 43, 58, .06); cursor: pointer; }
.activity-card-toggle:hover { border-color: #9fb0c2; background: #f0f3f6; color: #202936; }
.activity-card-toggle i { width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.activity-card-toggle[aria-expanded="true"] i { margin-top: 3px; transform: rotate(225deg); }

.activity-history-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.activity-history-panel > header { display: flex; align-items: center; justify-content: center; height: 49px; min-height: 49px; padding: 8px 14px; border-bottom: 1px solid #dce2e9; background: #f8f9fb; }
.activity-history-panel h2 { width: 100%; margin: 0; color: #202936; font-size: 16px; font-weight: 700; line-height: 1.4; text-align: center; }
.activity-history-events { display: grid; align-content: start; gap: 7px; min-height: 0; padding: 8px 10px 10px; overflow-y: auto; }
.activity-history-event { position: relative; display: block; padding: 9px 38px 9px 34px; border: 1px solid #e1e6ec; border-radius: 6px; background: #fff; }
.activity-history-event.is-edited { padding-bottom: 24px; }
.activity-history-event.is-overdue { border-color: #efb8bf; background: #fff4f5; }
.activity-history-event.is-today { border-color: #e5cf8f; background: #fff9e8; }
.activity-history-icon { position: absolute; top: 10px; left: 9px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #edf1f6; }
.activity-history-icon img { width: 11px; height: 11px; }
.timeline-follow-up-created .activity-history-icon { background: #e4eefc; }
.timeline-follow-up-completed .activity-history-icon { background: #e2f3e9; }
.timeline-pipeline .activity-history-icon { background: #fff0d8; }
.timeline-edited .activity-history-icon { background: #eee9fb; }
.activity-history-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.activity-history-meta time { padding-right: 8px; border-right: 1px solid #dfe4ea; color: #344054; font-size: 12px; font-weight: 800; line-height: 1.4; font-variant-numeric: tabular-nums; }
.activity-history-meta b { min-width: 0; color: #667283; font-size: 12px; font-weight: 750; line-height: 1.4; }
.activity-history-meta button { display: grid; place-items: center; width: 24px; min-height: 24px; margin-left: auto; padding: 0; border: 0; background: transparent; }
.activity-history-meta button img { width: 14px; height: 14px; }
.activity-history-event p { margin: 0; color: #202936; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.activity-history-event small { display: block; margin-top: 3px; color: #5c6879; font-size: 12px; line-height: 1.4; }
.activity-history-event .activity-history-purpose { margin: 0 0 8px; color: #687485; font-weight: 750; }
.activity-history-event .activity-history-deadline { margin-top: 8px; }
.activity-history-event .activity-history-edited { position: absolute; right: 10px; bottom: 7px; margin: 0; color: #98a1ad; font-size: 10px; font-weight: 500; line-height: 1.2; }
.activity-history-edit { display: grid; gap: 7px; margin-top: 8px; }
.activity-history-edit label { display: grid; gap: 4px; color: #667283; font-size: 11px; font-weight: 750; }
.activity-history-edit select,
.activity-history-edit textarea { width: 100%; border: 1px solid #d6dde7; border-radius: 6px; background: #fff; color: #202936; font: inherit; }
.activity-history-edit select { min-height: 36px; padding: 6px 30px 6px 9px; }
.activity-history-edit textarea { min-height: 70px; padding: 8px 9px; resize: vertical; }
.activity-history-edit > div { display: flex; justify-content: flex-end; gap: 7px; }
.activity-history-edit button { min-height: 32px; padding: 6px 10px; }

.activities-page[data-view-mode="compact"] .activity-history-workspace.is-card-collapsed { grid-template-columns: minmax(0, 1fr); }
.activities-page[data-view-mode="compact"] .activity-history-workspace.is-card-collapsed .activity-history-panel { display: none; }
.activities-page[data-view-mode="compact"] .activity-history-workspace.is-card-collapsed .activity-shell { height: auto; min-height: 0; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-status-model { height: 38px; min-height: 38px; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-status-button { height: 38px; min-height: 38px; padding: 7px 7px 5px; font-size: 11px; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-card { padding: 9px 14px 45px; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-card-toggle { width: 48px; min-height: 28px; border: 1px solid #d5dde7; background: #fff; box-shadow: 0 1px 2px rgba(31, 43, 58, .06); }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-card-toggle:hover { border-color: #aebdce; background: #f5f8fb; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-card-toggle i { width: 7px; height: 7px; border-width: 1.5px; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-heading { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 18px; margin: 0; padding: 0; border: 0; background: transparent; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-heading a,
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-heading strong { font-size: 16px; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-heading span { font-size: 12px; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; align-items: center; padding-left: 13px; border-left: 3px solid #3478d4; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step small { grid-column: 1 / 3; color: #657286; font-size: 10px; font-weight: 750; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step strong { overflow: hidden; color: #202936; font-size: 13px; font-weight: 750; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step time { color: #245f9f; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step.activity-date-overdue { border-left-color: #d5283d; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step.activity-date-overdue time { color: #b0182b; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step.activity-date-today { border-left-color: #b47b00; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step.activity-date-today time { color: #795500; }
.activities-page[data-view-mode="compact"] .is-card-collapsed .activity-collapsed-summary { display: none; }

.planner-page { width: min(1280px, 100%); }
.planner-filterbar { grid-template-columns: minmax(0, 1fr); }
.planner-matrix { display: grid; grid-template-columns: 142px repeat(3, minmax(230px, 1fr)); gap: 8px; align-items: stretch; overflow-x: auto; }
.planner-matrix-corner,
.planner-column-heading,
.planner-row-heading,
.planner-cell { min-width: 0; border: 1px solid #d9e0e8; border-radius: 6px; }
.planner-matrix-corner { border-color: transparent; }
.planner-column-heading { display: grid; place-items: center; min-height: 46px; padding: 9px 12px; color: #344054; font-size: 13px; font-weight: 850; text-align: center; }
.planner-column-heading.overdue { border-color: #efc7cc; background: #fff4f5; color: #a91427; }
.planner-column-heading.today { border-color: #ead7a5; background: #fff9e9; color: #765300; }
.planner-column-heading.future { border-color: #c7dfd1; background: #f1f8f4; color: #276244; }
.planner-row-heading { display: grid; place-items: center start; min-height: 172px; margin: 0; padding: 14px; background: #f6f7f9; color: #303947; font-size: 13px; font-weight: 850; line-height: 1.35; }
.planner-cell { position: relative; display: grid; align-content: start; gap: 7px; min-height: 172px; max-height: 420px; padding: 28px 7px 7px; overflow-y: auto; background: #f7f9fb; }
.planner-cell.overdue { background: #fff8f8; }
.planner-cell.today { background: #fffcf4; }
.planner-cell.future { background: #f7faf8; }
.planner-cell-count { position: absolute; top: 7px; right: 8px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e9edf2; color: #5e6978; font-size: 10px; font-weight: 850; font-variant-numeric: tabular-nums; }
.planner-card { position: relative; display: grid; gap: 6px; min-width: 0; padding: 10px; border: 1px solid #dbe1e8; border-left: 3px solid #7e8b9e; border-radius: 5px; background: #fff; box-shadow: 0 1px 2px rgba(24, 35, 50, .04); color: #202936; }
.planner-card-link { position: absolute; z-index: 1; inset: 0; border-radius: inherit; }
.planner-card > :not(.planner-card-link) { position: relative; z-index: 2; pointer-events: none; }
.planner-card .crm-head-company-badge { pointer-events: auto; }
.planner-cell.overdue .planner-card { border-left-color: #d72b40; }
.planner-cell.today .planner-card { border-left-color: #c28a12; }
.planner-cell.future .planner-card { border-left-color: #3a8b61; }
.planner-card:hover { border-color: #9fabb9; box-shadow: 0 3px 9px rgba(24, 35, 50, .09); transform: translateY(-1px); }
.planner-card > header,
.planner-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.planner-card > header time { color: #374151; font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.planner-card > header span { overflow: hidden; color: #697586; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.planner-card > .crm-company-title-line { display: flex; width: 100%; }
.planner-card > .crm-company-title-line > strong { overflow: hidden; font-size: 12px; font-weight: 850; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.planner-card > p { display: -webkit-box; margin: 0; overflow: hidden; color: #4c5868; font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.planner-card > footer { padding-top: 4px; border-top: 1px solid #edf0f4; color: #6d7888; font-size: 9px; }
.planner-card > footer span,
.planner-card > footer small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planner-card-tags { display: flex; gap: 4px; overflow: hidden; }
.planner-card-tags .company-tag-badge { max-width: 100px; padding: 2px 5px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.planner-empty { align-self: center; margin: 26px 0 0; color: #9aa3af; font-size: 11px; text-align: center; }
.planner-no-step { margin-top: 18px; padding: 14px; border: 1px solid #d9e0e8; border-radius: 6px; background: #f7f9fb; }
.planner-no-step > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.planner-no-step > header h2 { margin: 0; font-size: 16px; }
.planner-no-step > header span { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #e9edf2; color: #5e6978; font-size: 11px; font-weight: 850; }
.planner-no-step > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.planner-card-missing { border-left-color: #d72b40; }
.activity-empty-step { display: grid; gap: 4px; margin-bottom: 12px; padding: 14px; border: 1px solid #d9e0e8; border-left: 3px solid #d72b40; border-radius: 5px; background: #f7f9fb; }
.activity-empty-step strong { font-size: 15px; }
.activity-empty-step span { color: #697586; font-size: 13px; }

.activity-status-dialog { width: min(470px, calc(100vw - 24px)); padding: 0; border: 1px solid #d9e0e8; border-radius: 7px; box-shadow: 0 24px 70px rgba(18, 28, 41, .25); }
.activity-status-dialog::backdrop { background: rgba(25, 33, 45, .38); }
.activity-status-dialog form { display: grid; gap: 13px; padding: 16px; }
.activity-status-dialog header,
.activity-status-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.activity-status-dialog h3 { margin: 0; font-size: 16px; }
.activity-status-dialog header button { width: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; font-size: 24px; }
.activity-status-dialog label { display: grid; gap: 5px; color: #5f6b7e; font-size: 11px; font-weight: 850; }
.activity-status-dialog label span { font-weight: 600; }
.activity-close-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.activity-close-fields[hidden] { display: none; }
.activity-close-fields .activity-close-reason { grid-column: 1 / -1; }
.activity-status-dialog select,
.activity-status-dialog input { width: 100%; min-height: 38px; margin: 0; padding: 8px 10px; border: 1px solid #cfd7e1; border-radius: 5px; background: #fff; color: #202936; font-size: 13px; }
.activity-status-dialog textarea { min-height: 80px; }
.activity-status-dialog footer { justify-content: flex-end; }
.lpr-legacy-control { display: none !important; }
.panel-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-edit-icon { display: grid; place-items: center; width: 32px; min-height: 32px; padding: 0; border: 1px solid #d8dee7; background: #fff; }
.panel-edit-icon img { width: 15px; height: 15px; }
.lpr-profile-editor { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e0e4e9; }
.lpr-profile-editor[hidden] { display: none; }
.lpr-profile-editor > label,
.lpr-profile-editor .split label { display: grid; gap: 5px; color: #616c7c; font-size: 11px; font-weight: 800; }
.panel-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1100px) {
  .activities-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activities-reflow-filterbar .activities-extra-filter > div { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .crm-list-filterbar .activities-extra-filter > div { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .planner-matrix { grid-template-columns: 120px repeat(3, minmax(220px, 1fr)); }
  .planner-no-step > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .activity-history-workspace { grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr); }
}
@media (max-width: 980px) {
  .activity-history-workspace { grid-template-columns: 1fr; }
  .activity-shell,
  .activity-history-panel { min-height: auto; }
  .activity-history-panel { height: auto !important; max-height: 520px; }
  .activity-history-workspace.is-card-collapsed .activity-shell { height: auto; min-height: auto; }
}
@media (max-width: 700px) {
  .activities-filterbar { grid-template-columns: 1fr; }
  .activities-filter-primary { flex-wrap: wrap; }
  .activities-company-search { flex-basis: 100%; }
  .activities-filter-primary > .activities-multiselect { flex: 1 1 calc(100% - 48px); }
  .activities-extra-filter > div { grid-template-columns: 1fr; }
  .activities-reflow-filterbar .activities-extra-filter > div { grid-template-columns: 1fr; }
  .crm-list-filterbar .activities-extra-filter > div { grid-template-columns: 1fr; }
  .crm-list-filterbar > .crm-list-mine-filter { justify-self: start; white-space: normal; }
  .work-funnel-filterbar .activities-extra-filter > div { grid-template-columns: 1fr; }
  .activities-heading { align-items: flex-start; flex-direction: column; }
  .activities-period-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .activities-view-switcher { width: 100%; }
  .activities-view-switcher button { flex: 1 1 0; padding-inline: 5px; }
  .activities-filter-reset { justify-self: end; }
  .activity-list-toolbar { position: static; width: 100%; align-items: stretch; flex-direction: column; justify-content: stretch; }
  .activities-sort-control,
  .activities-view-control { width: 100%; justify-content: space-between; }
  .activities-sort-control select { width: min(220px, 100%); }
  .activity-close-fields { grid-template-columns: 1fr; }
  .activity-close-fields .activity-close-reason { grid-column: 1; }
  .activity-status-model { grid-template-columns: repeat(5, 126px); overflow-x: auto; }
  .activity-summary-row { grid-template-columns: 118px minmax(0, 1fr); }
  .activity-company-card { padding-inline: 12px; }
  .activity-current-step dl { grid-template-columns: 1fr; }
  .activity-current-step dl div:nth-child(even) { border-left: 0; }
  .friendly-datetime { grid-template-columns: 132px 78px; }
  .activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-heading { grid-template-columns: 1fr; gap: 7px; }
  .activities-page[data-view-mode="compact"] .is-card-collapsed .activity-company-compact-step { padding-top: 6px; padding-left: 10px; }
  .planner-matrix { grid-template-columns: 104px repeat(3, 220px); padding-bottom: 4px; }
  .planner-no-step > div { grid-template-columns: 1fr; }
  .planner-row-heading { padding: 10px; font-size: 11px; }
}
.analytics-employee-filter { position: relative; min-width: 0; }
.analytics-employee-filter summary { min-height: 38px; padding: 10px 32px 8px 11px; overflow: hidden; border: 1px solid #d6dce3; border-radius: 5px; background: #fff; color: #343b44; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.analytics-employee-filter > div { position: absolute; top: calc(100% + 5px); left: 0; z-index: 8; display: grid; min-width: 250px; max-height: 260px; padding: 7px; overflow-y: auto; border: 1px solid #d7dce2; border-radius: 6px; background: #fff; box-shadow: 0 12px 28px rgba(24, 31, 40, .14); }
.analytics-employee-filter label { display: flex; align-items: center; gap: 8px; padding: 7px; font-size: 12px; }
.analytics-employee-filter input { width: 15px; min-height: 15px; margin: 0; padding: 0; }
.analytics-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.analytics-presets a { padding: 7px 3px; border: 1px solid #dce1e7; border-radius: 4px; color: #69727e; font-size: 9px; font-weight: 800; text-align: center; text-decoration: none; }
.analytics-presets a:hover { border-color: #2d73e8; color: #2d73e8; }
.analytics-tabs { display: flex; gap: 24px; margin: -2px 0 20px; padding: 0 4px; overflow-x: auto; border-bottom: 1px solid #dce1e7; background: #fff; }
.analytics-tabs a { position: relative; display: grid; flex: 0 0 auto; place-items: center; min-height: 48px; padding: 8px 4px; color: #5d6672; font-size: 12px; font-weight: 850; text-decoration: none; }
.analytics-tabs a.active { color: #171b20; }
.analytics-tabs a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: #e60012; content: ""; }
.analytics-kpis { display: grid; grid-template-columns: repeat(6, minmax(125px, 1fr)); margin-bottom: 14px; overflow: hidden; border: 1px solid #dce1e7; border-radius: 6px; background: #fff; }
.analytics-kpis-compact { grid-template-columns: repeat(6, minmax(145px, 1fr)); }
.analytics-portfolio-kpis { grid-template-columns: repeat(6, minmax(130px, 1fr)); }
.analytics-statistics-kpis { grid-template-columns: repeat(7, minmax(125px, 1fr)); }
.analytics-kpis article { min-width: 0; padding: 16px; border-right: 1px solid #e4e7eb; }
.analytics-kpis article:last-child { border-right: 0; }
.analytics-kpis span { display: block; min-height: 28px; color: #68717c; font-size: 10px; font-weight: 800; }
.analytics-kpis strong { display: block; color: #171b20; font-size: 24px; line-height: 1.1; }
.analytics-kpis small { display: block; min-height: 25px; margin-top: 6px; color: #818994; font-size: 9px; line-height: 1.35; }
.analytics-kpi-sparkline { display: block; width: 100%; height: 18px; margin-top: 4px; border-bottom: 2px solid #1769e0; transform: skewY(-2deg); }
.analytics-kpi-sparkline.is-violet { border-color: #7b4bc4; transform: skewY(2deg); }
.analytics-kpi-sparkline.is-cyan { border-color: #12a8bc; }
.analytics-kpi-sparkline.is-orange { border-color: #f06a21; transform: skewY(1deg); }
.analytics-kpi-sparkline.is-teal { border-color: #34a9bd; transform: skewY(-1deg); }
.analytics-kpi-sparkline.is-pink { border-color: #e9467d; transform: skewY(2deg); }
.analytics-kpi-warning strong, .analytics-negative { color: #d00012 !important; }
.analytics-panel { min-width: 0; overflow: hidden; border: 1px solid #dce1e7; border-radius: 6px; background: #fff; }
.analytics-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #e5e8ec; }
.analytics-panel > header span { color: #d00012; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.analytics-panel > header h2 { margin: 2px 0 0; font-size: 16px; }
.analytics-panel > header small { color: #7c8590; font-size: 10px; }
.analytics-panel > header > strong { color: #171b20; font-size: 22px; }
.analytics-overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .85fr); gap: 14px; margin-bottom: 14px; }
.analytics-trend { display: flex; align-items: stretch; gap: 3px; height: 245px; padding: 18px 16px 5px; overflow-x: auto; }
.analytics-trend-day { display: grid; flex: 1 0 18px; grid-template-rows: 1fr 18px; min-width: 18px; }
.analytics-trend-bars { position: relative; display: flex; align-items: flex-end; gap: 1px; min-height: 0; }
.analytics-trend-bars i, .analytics-trend-bars b { display: block; width: 50%; min-height: 1px; border-radius: 2px 2px 0 0; }
.analytics-trend-bars i { background: #69727d; }
.analytics-trend-bars b { background: #e00013; }
.analytics-trend-day > span { color: #8a929c; font-size: 8px; text-align: center; white-space: nowrap; }
.analytics-trend-panel footer { display: flex; gap: 18px; padding: 8px 16px 13px; color: #67707b; font-size: 10px; }
.analytics-trend-panel footer span { display: flex; align-items: center; gap: 6px; }
.analytics-trend-panel footer i { width: 8px; height: 8px; border-radius: 2px; }
.legend-activity { background: #69727d; }
.legend-contact { background: #e00013; }
.analytics-funnel { display: grid; gap: 13px; padding: 15px 16px 18px; }
.analytics-funnel > div { display: grid; grid-template-columns: minmax(120px, 1fr) 80px 38px; gap: 8px; align-items: center; }
.analytics-funnel span { grid-column: 1; color: #3f4751; font-size: 11px; font-weight: 700; }
.analytics-funnel i { grid-column: 1; height: 4px; overflow: hidden; border-radius: 4px; background: #eef0f3; }
.analytics-funnel i b { display: block; height: 100%; background: #e00013; }
.analytics-funnel strong { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.analytics-funnel small { grid-row: 1 / span 2; grid-column: 3; color: #858d97; font-size: 9px; text-align: right; }

/* Compact CRM entity pages */
.crm-compact-entity-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 20px;
  border-bottom: 1px solid #dde3ea;
}
.crm-compact-entity-head h1 {
  max-width: 1050px;
  margin: 5px 0 4px;
  color: #1f2732;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.crm-compact-entity-head p { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; color: #6c7888; font-size: 12px; }
.crm-compact-entity-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  margin-left: auto;
}
.crm-compact-entity-owner { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; min-width: 190px; text-align: right; }
.crm-compact-entity-owner > span { grid-column: 1; color: #798596; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.crm-compact-entity-owner > strong { grid-column: 1; color: #27313e; font-size: 14px; }
.crm-compact-entity-owner .crm-icon-button { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.crm-entity-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 4px;
  width: 216px;
}
.crm-entity-matrix a,
.crm-entity-matrix span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 6px 9px;
  border: 1px solid #888e96;
  border-radius: 4px;
  background: #8b8f94;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}
.crm-entity-matrix a:hover { border-color: #555b63; background: #6e737a; }
.crm-entity-matrix .active {
  border-color: transparent;
  background: #353a42;
}
.crm-entity-matrix .disabled { opacity: .42; }
.crm-section-entity-nav {
  align-self: flex-start;
  margin-left: auto;
  padding-top: 0;
}
.app-global-header .crm-section-row.has-entity-matrix {
  align-items: flex-start;
  min-height: 96px;
  padding-bottom: 10px;
}
.app-global-header .crm-section-row.has-entity-matrix .crm-subnav {
  align-self: flex-start;
  min-height: 56px;
}
.crm-deal-command-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.crm-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #d4dce6;
  border-radius: 6px;
  background: #fff;
  color: #354154;
  cursor: pointer;
}
.crm-icon-button:hover { border-color: #9eabbc; background: #f6f8fb; }
.crm-icon-button img { width: 15px; height: 15px; }
.crm-icon-button > span { font-size: 20px; line-height: 1; }
.crm-small-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  background: #fff;
  color: #263343;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.crm-small-command:hover { border-color: #9eabba; background: #f5f7fa; }
.crm-small-command.primary { border-color: #df0013; background: #e50012; color: #fff; }
.crm-small-command.primary:hover { background: #c90010; }
.crm-compact-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-height: 10px; margin: 10px 0 -4px; }
.crm-compact-toolbar > form { margin: 0; }
.crm-record-tabs {
  display: flex;
  gap: 3px;
  margin: 20px 0 16px;
  padding-bottom: 1px;
  overflow-x: auto;
  border-bottom: 1px solid #dfe5ec;
}
.crm-record-tabs button {
  position: relative;
  min-height: 35px;
  padding: 7px 12px 9px;
  border: 0;
  border-radius: 5px 5px 0 0;
  background: transparent;
  color: #687486;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.crm-record-tabs button:hover { background: #f0f3f7; color: #303b49; }
.crm-record-tabs button.active { background: #363d47; color: #fff; }
.crm-record-tabs button span { margin-left: 4px; opacity: .66; }
.crm-entity-panel { display: none; }
.crm-entity-panel.active { display: block; }
.crm-holding-overview-grid,
.crm-company-overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .75fr); gap: 14px; align-items: start; }
.crm-holding-overview-grid > div,
.crm-company-overview-grid > div,
.crm-holding-overview-grid > aside,
.crm-company-overview-grid > aside { display: grid; gap: 14px; min-width: 0; }
.crm-compact-section {
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 7px;
  background: #fff;
}
.crm-compact-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 10px 14px;
  border-bottom: 1px solid #e4e9ef;
  background: #f5f7fa;
}
.crm-compact-section > header h2 { margin: 0; color: #26313f; font-size: 14px; line-height: 1.3; }
.crm-compact-section > header p { margin: 2px 0 0; color: #768294; font-size: 10px; }
.crm-compact-section dl { min-width: 0; }
.crm-compact-section dl dt,
.crm-compact-section dl dd { padding: 0; border: 0; box-shadow: none; }
.crm-compact-data-grid { margin: 0; padding: 4px 14px 8px; }
.crm-company-overview-grid > aside .crm-compact-data-grid { display: block; }
.crm-compact-data-grid > div { display: grid; grid-template-columns: minmax(120px, 35%) minmax(0, 1fr); gap: 18px; padding: 10px 0; border-bottom: 1px solid #e9edf2; }
.crm-compact-data-grid > div:last-child { border-bottom: 0; }
.crm-compact-data-grid dt { color: #717d8d; font-size: 11px; line-height: 1.4; }
.crm-compact-data-grid dd { min-width: 0; margin: 0; color: #303b49; font-size: 12px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.crm-compact-data-grid dt,
.crm-compact-data-grid dd { padding: 0; border: 0; box-shadow: none; }
.crm-compact-data-grid.stacked > div { grid-template-columns: minmax(120px, 25%) minmax(0, 1fr); }
.crm-compact-data-grid a { color: #bd0010; }
.crm-company-identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid #e4e9ef; }
.crm-company-identity-grid > dl { display: block; min-width: 0; margin: 0; padding: 8px 14px; }
.crm-company-identity-grid > dl + dl { border-left: 1px solid #e4e9ef; }
.crm-company-identity-grid dl > div { display: grid; grid-template-columns: minmax(128px, 36%) minmax(0, 1fr); gap: 14px; min-height: 44px; padding: 11px 0; }
.crm-company-identity-grid dl > div + div { border-top: 1px solid #edf0f4; }
.crm-company-identity-grid dt { padding: 0; border: 0; color: #717d8d; font-size: 11px; line-height: 1.4; }
.crm-company-identity-grid dd { min-width: 0; margin: 0; padding: 0; border: 0; color: #303b49; font-size: 12px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.crm-company-presence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.crm-company-activity-groups > .crm-compact-data-grid + .crm-compact-data-grid { padding-top: 8px; border-top: 1px solid #dce3eb; }
.crm-compact-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: 8px; }
.crm-compact-metrics > div { min-width: 0; padding: 10px; }
.crm-compact-metrics dt { color: #778394; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.crm-compact-metrics dd { margin: 4px 0 0; color: #252f3c; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.crm-embedded-table { border: 0; border-radius: 0; box-shadow: none; }
.crm-embedded-table .crm-table { margin: 0; }
.crm-embedded-table .crm-table th { background: #f5f7fa; }
.crm-compact-action-column { width: 46px; text-align: right; }
.crm-compact-action-column form { display: inline; }
.crm-scoped-activity-list { display: grid; gap: 0; padding: 2px 12px 8px; }
.crm-scoped-activity-list > div { display: grid; gap: 3px; padding: 10px 2px; border-bottom: 1px solid #e9edf2; }
.crm-scoped-activity-list > div:last-child { border-bottom: 0; }
.crm-scoped-activity-list strong { color: #293443; font-size: 11px; }
.crm-scoped-activity-list span { color: #697689; font-size: 10px; line-height: 1.4; }
.crm-company-two-column { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 14px; align-items: stretch; }
.crm-company-two-column > .crm-contact-column { height: 100%; margin-bottom: 0; }
.crm-contact-records { display: grid; gap: 0; padding: 4px 14px 10px; }
.crm-contact-records article { padding: 12px 0; border-bottom: 1px solid #e5eaf0; }
.crm-contact-records article:last-child { border-bottom: 0; }
.crm-contact-records article > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-contact-records article > header > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crm-contact-records article > header strong { color: #273240; font-size: 13px; }
.crm-contact-records article > header span { padding: 2px 6px; border-radius: 4px; background: #eef3f9; color: #647184; font-size: 9px; font-weight: 800; }
.crm-contact-records dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin: 9px 0 0; }
.crm-contact-records dl div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
.crm-contact-records dt { padding: 0; border: 0; color: #7b8695; font-size: 10px; }
.crm-contact-records dd { min-width: 0; margin: 0; padding: 0; border: 0; color: #3b4654; font-size: 11px; overflow-wrap: anywhere; }
.crm-contact-records dl .is-history dt,
.crm-contact-records dl .is-history dd { color: #929aa5; }
.crm-person-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; padding: 12px; border: 1px solid #dbe2eb; border-radius: 6px; background: #fafbfc; }
.crm-person-editor label { color: #657183; font-size: 10px; }
.crm-person-editor input { min-height: 34px; margin-top: 4px; padding: 7px 9px; font-size: 11px; }
.crm-person-editor .crm-check { align-self: end; min-height: 34px; }
.crm-person-editor > footer { display: flex; align-items: end; justify-content: flex-end; gap: 7px; }
.crm-compact-inline-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 14px; padding: 12px; border: 1px solid #dbe2eb; border-radius: 6px; background: #fafbfc; }
.crm-compact-inline-editor label { font-size: 10px; }
.crm-compact-inline-editor input,
.crm-compact-inline-editor select { min-height: 34px; margin-top: 4px; padding: 7px 9px; font-size: 11px; }
.crm-compact-inline-editor .crm-check { display: flex; align-items: center; gap: 7px; }
.crm-compact-inline-editor .crm-check input { width: 16px; min-height: 16px; margin: 0; }
.crm-development-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.crm-development-grid > div { min-height: 150px; padding: 16px; border-right: 1px solid #e5eaf0; border-bottom: 1px solid #e5eaf0; }
.crm-development-grid > div:nth-child(2n) { border-right: 0; }
.crm-development-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.crm-development-grid dt { padding: 0; border: 0; color: #6d798a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.crm-development-grid dd { margin: 9px 0 0; padding: 0; border: 0; color: #303b49; font-size: 12px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.crm-potential-section > header > strong { color: #26323f; font-size: 20px; white-space: nowrap; }
.crm-potential-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.crm-potential-grid label { color: #5f6b7b; font-size: 10px; }
.crm-potential-grid input { min-height: 36px; margin-top: 5px; padding: 8px 10px; color: #283443; font-size: 12px; text-align: right; }
.crm-potential-section form > footer,
.crm-side-panel form > footer { display: flex; justify-content: flex-end; padding: 0 14px 14px; }
.crm-side-panel-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(25, 33, 44, .36); }
.crm-side-panel { width: min(460px, 94vw); height: 100%; overflow-y: auto; border-left: 1px solid #d4dce6; background: #fff; box-shadow: -18px 0 50px rgba(22, 31, 43, .18); }
.crm-side-panel.wide { width: min(680px, 96vw); }
.crm-side-panel > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 12px 16px; border-bottom: 1px solid #dfe5ec; background: #fff; }
.crm-side-panel > header h2 { margin: 0; color: #26313f; font-size: 16px; }
.crm-side-panel > header p { margin: 3px 0 0; color: #778294; font-size: 10px; }
.crm-side-panel > form { display: grid; gap: 14px; padding: 16px; border-bottom: 1px solid #e1e6ec; }
.crm-side-panel > form label { font-size: 11px; }
.crm-side-panel > form input,
.crm-side-panel > form select,
.crm-side-panel > form textarea { min-height: 36px; margin-top: 5px; padding: 8px 10px; font-size: 11px; }
.crm-company-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.crm-company-edit-grid .wide { grid-column: 1 / -1; }
.crm-search-selection-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.crm-search-selection-tools button { padding: 0; border: 0; background: transparent; color: #b80010; font-size: 10px; font-weight: 750; cursor: pointer; }
.crm-search-selection-tools span { color: #6e7a8c; font-size: 10px; }
.crm-company-search-results { display: grid; max-height: calc(100vh - 260px); overflow-y: auto; border: 1px solid #dce3eb; border-radius: 6px; }
.crm-company-search-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: center; min-height: 42px; padding: 8px 10px; border-bottom: 1px solid #e8edf2; font-size: 11px; font-weight: 600; cursor: pointer; }
.crm-company-search-option:last-child { border-bottom: 0; }
.crm-company-search-option:hover { background: #f6f8fa; }
.crm-company-search-option input { width: 16px; min-height: 16px; margin: 0; }

@media (max-width: 980px) {
  .crm-holding-overview-grid,
  .crm-company-overview-grid,
  .crm-company-two-column { grid-template-columns: 1fr; }
  .crm-potential-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .crm-compact-entity-head { align-items: flex-start; flex-direction: column; }
  .crm-compact-entity-side { align-self: stretch; justify-items: end; width: 100%; }
  .crm-compact-entity-owner { min-width: 0; text-align: left; }
  .crm-development-grid,
  .crm-potential-grid,
  .crm-company-edit-grid,
  .crm-compact-inline-editor,
  .crm-company-identity-grid,
  .crm-company-presence-grid,
  .crm-person-editor { grid-template-columns: 1fr; }
  .crm-company-identity-grid > dl + dl { border-top: 1px solid #e4e9ef; border-left: 0; }
  .crm-company-identity-grid dl > div { grid-template-columns: 1fr; gap: 4px; }
  .crm-development-grid > div { min-height: 0; border-right: 0; border-bottom: 1px solid #e5eaf0; }
  .crm-development-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid #e5eaf0; }
  .crm-development-grid > div:last-child { border-bottom: 0; }
  .crm-compact-data-grid > div,
  .crm-compact-data-grid.stacked > div { grid-template-columns: 1fr; gap: 4px; }
  .crm-company-edit-grid .wide { grid-column: auto; }
}
.analytics-table-panel { margin-bottom: 14px; }
.analytics-table-scroll { width: 100%; overflow-x: auto; }
.analytics-table-scroll table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.analytics-table-scroll th, .analytics-table-scroll td { padding: 10px 13px; border-bottom: 1px solid #eceef1; text-align: right; }
.analytics-table-scroll th:first-child, .analytics-table-scroll td:first-child, .analytics-table-scroll tbody th { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; }
.analytics-table-scroll thead th { background: #f6f7f9; color: #606976; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.analytics-table-scroll thead th:first-child { z-index: 2; background: #f6f7f9; }
.analytics-table-scroll tbody tr:hover td, .analytics-table-scroll tbody tr:hover th { background: #fff7f8; }
.analytics-table-scroll tfoot th, .analytics-table-scroll tfoot td { background: #f6f7f9; font-weight: 850; }
.analytics-three-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.analytics-four-column { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.analytics-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.analytics-workflow-note { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-workflow-note > header { grid-column: 1 / -1; }
.analytics-workflow-note > div {
  min-width: 0;
  padding: 16px;
}
.analytics-workflow-note > div + div { border-left: 1px solid #e5e8ec; }
.analytics-workflow-note > div strong { color: #252b33; font-size: 12px; }
.analytics-workflow-note > div p { margin: 7px 0 0; color: #68717c; font-size: 11px; line-height: 1.55; }
.analytics-breakdown { padding-bottom: 9px; }
.analytics-breakdown > div { display: grid; grid-template-columns: minmax(120px, 1fr) 72px; gap: 8px; align-items: center; padding: 8px 15px; }
.analytics-breakdown > div > span { grid-column: 1; overflow: hidden; color: #4f5863; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.analytics-breakdown > div > i { grid-column: 1; height: 3px; overflow: hidden; border-radius: 3px; background: #edf0f3; }
.analytics-breakdown > div > i b { display: block; height: 100%; background: #e00013; }
.analytics-breakdown > div > strong { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.analytics-empty { padding: 24px; color: #747d88; font-size: 12px; }
.analytics-sales-period { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.analytics-sales-period > label { display: grid; gap: 5px; color: #68717c; font-size: 10px; font-weight: 800; }
.analytics-sales-date-range { display: flex; align-items: center; min-height: 42px; overflow: hidden; border: 1px solid #d7dce3; border-radius: 5px; background: #fff; }
.analytics-sales-date-range input { width: 138px; min-height: 40px; margin: 0; padding: 8px 10px; border: 0; background: transparent; font: inherit; font-size: 11px; }
.analytics-sales-date-range b { color: #858e99; font-size: 11px; }
.analytics-sales-presets { display: flex; min-height: 42px; overflow: hidden; border: 1px solid #d7dce3; border-radius: 5px; background: #fff; }
.analytics-sales-presets a { display: grid; place-items: center; min-width: 78px; padding: 8px 13px; border-left: 1px solid #e5e8ec; color: #59626e; font-size: 11px; font-weight: 750; text-decoration: none; }
.analytics-sales-presets a:first-child { border-left: 0; }
.analytics-sales-presets a:hover { background: #fff2f3; color: #be0012; }
.analytics-sales-matrix { margin-bottom: 14px; }
.analytics-sales-matrix > header { min-height: 52px; }
.analytics-sales-matrix > header h2 { margin: 0; font-size: 14px; }
.analytics-sales-matrix > header label { display: flex; align-items: center; gap: 8px; color: #747d89; font-size: 10px; font-weight: 700; }
.analytics-sales-matrix > header input {
  width: 34px;
  height: 18px;
  margin: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background-color: #2f73e8;
  background-image: radial-gradient(circle at calc(100% - 9px) 50%, #fff 0 6px, transparent 7px);
  opacity: 1;
}
.analytics-sales-rows { display: grid; }
.analytics-sales-row { display: grid; grid-template-columns: 170px minmax(420px, 1fr) 130px; min-height: 105px; border-top: 1px solid #e5e8ec; }
.analytics-sales-row:first-child { border-top: 0; }
.analytics-sales-metric { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-content: center; gap: 4px 8px; padding: 16px; border-right: 1px solid #e5e8ec; }
.analytics-sales-metric i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--metric-color); }
.analytics-sales-metric strong { color: #343b45; font-size: 10px; line-height: 1.35; }
.analytics-sales-metric span { grid-column: 2; color: #7d8590; font-size: 9px; }
.analytics-sales-chart { position: relative; min-width: 0; padding: 4px 10px 19px; overflow: hidden; border-right: 1px solid #e5e8ec; background-image: linear-gradient(to bottom, transparent 49%, rgba(221, 226, 232, .65) 50%, transparent 51%); }
.analytics-sales-chart svg { display: block; width: 100%; height: 80px; overflow: visible; }
.analytics-sales-chart line { stroke: #e6e9ed; stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-sales-chart polyline { fill: none; stroke: var(--metric-color); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.analytics-sales-chart circle { fill: var(--metric-color); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.analytics-sales-chart text { fill: #555f6b; font-size: 8px; font-weight: 750; text-anchor: middle; }
.analytics-sales-axis { position: absolute; right: 10px; bottom: 4px; left: 10px; display: flex; justify-content: space-between; gap: 2px; color: #9299a2; font-size: 7px; }
.analytics-sales-axis span { overflow: hidden; text-align: center; text-overflow: clip; white-space: nowrap; }
.analytics-sales-total { display: grid; align-content: center; gap: 3px; padding: 14px 16px; }
.analytics-sales-total strong { color: #20252b; font-size: 17px; line-height: 1.15; }
.analytics-sales-total span { color: #8a929c; font-size: 9px; }
.analytics-sales-total em { color: #2a9958; font-size: 10px; font-style: normal; font-weight: 800; }
.analytics-portfolio-panel { margin-bottom: 14px; }
.analytics-portfolio-panel > header h2 { margin: 0; font-size: 14px; }
.analytics-export-button { min-height: 34px; padding: 7px 12px; border: 1px solid #d8dde4; border-radius: 5px; background: #fff; color: #343b45; font-size: 10px; font-weight: 800; cursor: pointer; }
.analytics-portfolio-table th small { display: block; margin-top: 3px; color: #8a929c; font-size: 8px; font-weight: 600; }
.analytics-portfolio-table th a { color: #216ed8; text-decoration: none; }
.analytics-portfolio-table tfoot th,
.analytics-portfolio-table tfoot td { background: #f7f9fc; color: #20252b; font-weight: 900; }
.analytics-portfolio-owner th, .analytics-portfolio-owner td { background: #f7f9fc !important; font-weight: 900; }
.analytics-portfolio-group th, .analytics-portfolio-group td { background: #fbfcfe !important; font-weight: 800; }
.analytics-portfolio-trends { margin-bottom: 14px; }
.analytics-portfolio-trends > header h2 { margin: 0; font-size: 14px; }
.analytics-portfolio-trends > article { display: grid; grid-template-columns: 170px minmax(420px, 1fr); min-height: 88px; border-top: 1px solid #e5e8ec; }
.analytics-portfolio-trends > article > div { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-content: center; gap: 4px 8px; padding: 15px; border-right: 1px solid #e5e8ec; }
.analytics-portfolio-trends > article > div i { width: 7px; height: 7px; border-radius: 50%; background: var(--metric-color); }
.analytics-portfolio-trends > article > div strong { font-size: 10px; }
.analytics-portfolio-trends > article > div span { grid-column: 2; color: #828b96; font-size: 9px; }
.analytics-portfolio-trends svg { width: 100%; height: 82px; padding: 3px 12px; overflow: visible; }
.analytics-portfolio-trends line { stroke: #e5e8ec; stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-portfolio-trends polyline { fill: none; stroke: var(--metric-color); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.analytics-portfolio-trends circle { fill: var(--metric-color); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.analytics-detail-footer { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; border-top: 1px solid #e5e8ec; background: #fff; }
.analytics-detail-footer > div { display: flex; align-items: center; gap: 6px; color: #7b8490; font-size: 9px; }
.analytics-detail-footer label { color: #5e6874; font-weight: 750; }
.analytics-detail-footer select { min-width: 86px; height: 30px; padding: 4px 24px 4px 8px; border: 1px solid #d8dde4; border-radius: 4px; background: #fff; color: #343b45; font-size: 9px; font-weight: 750; }
.analytics-detail-footer button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid #d8dde4; border-radius: 4px; background: #fff; color: #343b45; font-size: 16px; line-height: 1; cursor: pointer; }
.analytics-detail-footer form { display: contents; }
.analytics-rate-kpi > div { display: grid; width: 58px; height: 58px; place-items: center; margin: -3px auto 0; border-radius: 50%; background: conic-gradient(#e6003b 0 var(--rate), #e9edf2 var(--rate) 100%); }
.analytics-rate-kpi > div::before { grid-area: 1 / 1; width: 43px; height: 43px; border-radius: 50%; background: #fff; content: ""; }
.analytics-rate-kpi > div strong { z-index: 1; grid-area: 1 / 1; color: #e6003b; font-size: 16px; }
.analytics-rate-kpi > small { min-height: 10px; text-align: center; }
.analytics-statistics-kpis > article > strong { color: #e0002b; }
.analytics-statistics-charts { margin-bottom: 14px; }
.analytics-status-donut-panel > header h2, .analytics-call-trend > header h2 { margin: 0; font-size: 14px; }
.analytics-status-donut-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: center; min-height: 320px; padding: 22px; }
.analytics-status-donut { display: grid; width: 174px; height: 174px; place-items: center; border-radius: 50%; }
.analytics-status-donut::before { grid-area: 1 / 1; width: 112px; height: 112px; border-radius: 50%; background: #fff; content: ""; }
.analytics-status-donut > span { z-index: 1; grid-area: 1 / 1; display: grid; text-align: center; }
.analytics-status-donut strong { font-size: 26px; }
.analytics-status-donut small { color: #7f8893; font-size: 9px; }
.analytics-status-legend { display: grid; gap: 9px; }
.analytics-status-legend p { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 42px; gap: 7px; align-items: center; margin: 0; font-size: 10px; }
.analytics-status-legend p i { width: 7px; height: 7px; border-radius: 50%; }
.analytics-status-legend p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-status-legend p small { color: #7d8691; text-align: right; }
.analytics-call-trend > header > div { display: flex; gap: 12px; color: #646e7a; font-size: 9px; }
.analytics-call-trend > header > div span { display: flex; align-items: center; gap: 4px; color: inherit; text-transform: none; }
.analytics-call-trend > header > div i { width: 7px; height: 7px; border-radius: 50%; }
.analytics-call-trend > div { position: relative; min-height: 320px; padding: 26px 18px 30px; }
.analytics-call-trend svg { display: block; width: 100%; height: 240px; overflow: visible; }
.analytics-call-trend svg line { stroke: #e5e8ec; stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-call-trend svg polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.analytics-call-trend svg circle { stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.analytics-call-trend > div > div { position: absolute; right: 18px; bottom: 13px; left: 18px; display: flex; justify-content: space-between; color: #9299a2; font-size: 7px; }
.analytics-pivot-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.analytics-pivot-config { display: grid; gap: 12px; padding-bottom: 15px; }
.analytics-pivot-config > label { display: grid; gap: 5px; padding: 0 15px; color: #68717c; font-size: 10px; font-weight: 800; }
.analytics-pivot-config > button { margin: 0 15px; }
.analytics-pivot-config > p { margin: 0; padding: 0 15px; color: #7b8490; font-size: 9px; line-height: 1.45; }
.analytics-limit-note { margin: 0; padding: 9px 14px; background: #fff8df; color: #745a13; font-size: 10px; }
.analytics-export-form { display: flex; justify-content: flex-end; padding: 12px 14px; border-top: 1px solid #e5e8ec; }
.analytics-export-form button { background: #fff; color: #d00012; }
.analytics-quality { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 1320px) {
  .analytics-page-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .analytics-kpis { grid-template-columns: repeat(4, minmax(135px, 1fr)); }
  .analytics-kpis article { border-bottom: 1px solid #e4e7eb; }
  .analytics-sales-row { grid-template-columns: 145px minmax(360px, 1fr) 115px; }
  .analytics-sales-chart text { display: none; }
  .analytics-portfolio-kpis { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
}
@media (max-width: 980px) {
  .analytics-heading { align-items: flex-start; flex-direction: column; }
  .analytics-freshness { text-align: left; }
  .analytics-page-layout { grid-template-columns: 1fr; }
  .analytics-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-filterbar > header,
  .analytics-filterbar > button { grid-column: 1 / -1; }
  .analytics-overview-grid, .analytics-pivot-layout { grid-template-columns: 1fr; }
  .analytics-three-column, .analytics-four-column { grid-template-columns: 1fr 1fr; }
  .analytics-sales-period { align-items: stretch; flex-direction: column; }
  .analytics-sales-date-range { width: fit-content; }
  .analytics-status-donut-body { grid-template-columns: 150px minmax(0, 1fr); }
  .analytics-status-donut { width: 138px; height: 138px; }
  .analytics-status-donut::before { width: 88px; height: 88px; }
}
@media (max-width: 760px) {
  .analytics-kpis, .analytics-kpis-compact { grid-template-columns: 1fr 1fr; }
  .analytics-kpis article:nth-child(2n) { border-right: 0; }
  .analytics-three-column, .analytics-four-column, .analytics-two-column { grid-template-columns: 1fr; }
  .analytics-workflow-note { grid-template-columns: 1fr; }
  .analytics-workflow-note > header { grid-column: auto; }
  .analytics-workflow-note > div + div { border-top: 1px solid #e5e8ec; border-left: 0; }
  .analytics-trend { height: 210px; }
  .analytics-sales-matrix { overflow-x: auto; }
  .analytics-sales-matrix > header, .analytics-sales-rows { min-width: 760px; }
  .analytics-portfolio-trends { overflow-x: auto; }
  .analytics-portfolio-trends > header, .analytics-portfolio-trends > article { min-width: 700px; }
  .analytics-status-donut-body { grid-template-columns: 1fr; justify-items: center; }
  .analytics-status-legend { width: 100%; }
}
@media (max-width: 520px) {
  .analytics-filterbar { grid-template-columns: 1fr; }
  .analytics-filterbar > header,
  .analytics-filterbar > button { grid-column: auto; }
  .analytics-tabs a { padding-inline: 11px; }
  .crm-commercial-records > header { align-items: flex-start; flex-direction: column; }
  .crm-commercial-records details { width: 100%; }
  .crm-commercial-records details > summary { width: 100%; }
  .crm-commercial-records details > form {
    position: static;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
  }
  .crm-record-list > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .crm-record-list span { text-align: left; }
}

/* BPM access requests stay fully visible in a compact, activity-like row. */
.access-card-list {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  gap: 8px;
}
.access-card--compact {
  overflow: visible;
  border-radius: 6px;
  box-shadow: none;
}
.access-card--compact:hover {
  box-shadow: 0 3px 10px rgba(25, 32, 40, .06);
}
.access-compact-row {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.7fr)
    minmax(120px, .65fr)
    minmax(120px, .65fr)
    minmax(320px, 1.35fr);
  min-height: 74px;
  align-items: stretch;
}
.access-compact-company,
.access-compact-field {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
}
.access-compact-field + .access-compact-field,
.access-compact-company + .access-compact-field {
  border-left: 1px solid rgba(93, 102, 113, .13);
}
.access-card-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.access-card-title > strong,
.access-card-title > .activity-company-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-card-title .access-status {
  flex: 0 0 auto;
  padding: 3px 6px;
  font-size: 10px;
}
.access-company-meta {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.access-owner-tag {
  max-width: 150px;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid #9cc7f5;
  border-radius: 4px;
  background: #e8f3ff;
  color: #075fac;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-readonly-result { color: #68717c !important; font-weight: 700 !important; }
.access-company-inn,
.access-compact-field > span {
  color: #68717c;
  font-size: 10px;
  font-weight: 750;
}
.access-compact-field > strong,
.access-compact-field > time {
  min-width: 0;
  overflow: hidden;
  color: #20262d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-inline-warning {
  color: #b00011;
  font-size: 9px;
  font-weight: 850;
}
.access-card--compact .access-resolution-form {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto;
  gap: 6px;
}
.access-card--compact .access-resolution-form select,
.access-card--compact .access-save {
  min-height: 38px;
  height: 38px;
  margin: 0;
  font-size: 12px;
  line-height: normal;
}
.access-card--compact .access-resolution-form select {
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.access-card--compact .access-save { padding: 0 9px; }

@media (max-width: 1180px) {
  .access-compact-row {
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(110px, .75fr));
  }
  .access-card--compact .access-card-decision { grid-column: 1 / -1; border-top: 1px solid rgba(93, 102, 113, .13); border-left: 0; }
}

@media (max-width: 700px) {
  .access-compact-row { grid-template-columns: 1fr 1fr; }
  .access-compact-company { grid-column: 1 / -1; }
  .access-compact-row > * { border-top: 1px solid rgba(93, 102, 113, .13); }
  .access-compact-row > :first-child { border-top: 0; }
  .access-compact-row > :nth-child(2n) { border-left: 0; }
  .access-card--compact .access-card-decision { grid-column: 1 / -1; }
  .access-card--compact .access-resolution-form { grid-template-columns: minmax(0, 1fr) auto; }
}

/* CRM */
.crm-subnav {
  display: flex;
  gap: 22px;
  margin: -8px -18px 18px;
  padding: 0 28px;
  overflow-x: auto;
  border-bottom: 1px solid #dfe3e8;
  background: #fff;
}
.crm-subnav a {
  flex: 0 0 auto;
  padding: 13px 2px 11px;
  border-bottom: 2px solid transparent;
  color: #59626e;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.crm-subnav a.active { border-color: #e60012; color: #171b20; }
.app-global-header .crm-section-row { margin-top: 0; }
.app-global-header .crm-section-row::before { flex: 0 0 210px; content: ""; }
.app-global-header .crm-subnav { margin: 0; padding: 0 0 0 20px; border-bottom: 0; box-shadow: none; }
.app-global-header .crm-subnav a { padding-right: 0; padding-left: 0; }
@media (max-width: 1500px) {
  .app-global-header .crm-section-row::before { flex-basis: 165px; }
  .app-global-header .crm-subnav { padding-left: 15px; }
}
@media (max-width: 1050px) {
  .app-global-header .crm-section-row::before { flex-basis: 58px; }
  .app-global-header .crm-subnav { padding-left: 11px; }
}
@media (max-width: 760px) {
  .app-global-header .crm-section-row::before { flex-basis: 50px; }
  .app-global-header .crm-section-row { overflow-x: hidden; }
  .app-global-header .crm-subnav {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 0;
    padding-left: 10px;
  }
  .app-global-header .crm-section-row.has-entity-matrix {
    flex-wrap: wrap;
    min-height: 0;
    padding-bottom: 10px;
  }
  .app-global-header .crm-section-row.has-entity-matrix .crm-section-entity-nav {
    display: flex;
    flex: 0 0 100%;
    justify-content: flex-end;
    padding-top: 0;
  }
}
.crm-page-head,
.crm-company-head,
.crm-deal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.crm-page-head p,
.crm-company-head p,
.crm-deal-head p { margin: 0; color: #68717d; font-size: 12px; }
.crm-back { display: inline-block; margin-bottom: 9px; color: #68717d; font-size: 12px; font-weight: 700; text-decoration: none; }
.crm-entity-head-actions,
.crm-deal-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.crm-entity-switcher { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid #cfd5dc; border-radius: 6px; background: #fff; }
.crm-entity-switcher a,
.crm-entity-switcher span { min-height: 34px; padding: 9px 12px; border-right: 1px solid #dfe3e8; color: #566170; font-size: 12px; font-weight: 750; line-height: 1; text-decoration: none; }
.crm-entity-switcher :last-child { border-right: 0; }
.crm-entity-switcher a:hover { background: #f4f6f8; color: #242a31; }
.crm-entity-switcher .active { background: #eef1f4; color: #171b20; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  background: #fff;
  color: #242a31;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { border-color: #e60012; background: #e60012; color: #fff; }
.button.ghost { border-color: transparent; background: transparent; color: #626b77; }
.crm-filterbar,
.crm-deal-toolbar,
.crm-actionbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid #dfe3e8;
  background: #fff;
}
.crm-filterbar input,
.crm-filterbar select,
.crm-deal-toolbar input,
.crm-deal-toolbar select,
.crm-inline-form input,
.crm-inline-form select { min-height: 36px; margin: 0; padding: 8px 10px; }
.crm-filterbar > input,
.crm-search { flex: 1 1 360px; min-width: 180px; }
.crm-filterbar.multi { flex-wrap: wrap; }
.crm-filterbar.multi > input { max-width: 460px; }
.crm-filterbar.multi select { width: auto; min-width: 150px; }
.crm-check { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; }
.crm-check input { width: 15px; height: 15px; min-height: 0; margin: 0; }
.crm-table-wrap { overflow-x: auto; border: 1px solid #dfe3e8; background: #fff; }
.crm-table { width: 100%; min-width: 840px; border-collapse: collapse; font-size: 12px; }
.crm-table.compact { min-width: 660px; }
.crm-table th {
  padding: 9px 12px;
  border-bottom: 1px solid #dfe3e8;
  background: #f7f8fa;
  color: #606a76;
  font-size: 10px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
}
.crm-table td { padding: 10px 12px; border-bottom: 1px solid #edf0f3; vertical-align: top; }
.crm-table tbody tr:last-child td { border-bottom: 0; }
.crm-table tbody tr:hover { background: #fafbfc; }
.crm-table td small { display: block; margin-top: 3px; color: #76808c; font-size: 10px; }
.crm-entity-link { color: #171b20; font-weight: 800; text-decoration-color: #e60012; text-underline-offset: 4px; }
.crm-mode .crm-table.crm-reference-deals-table .crm-entity-link {
  color: #343b45;
  font-weight: 650;
  text-decoration: none;
}
.crm-row-action { text-align: right; }
.crm-owner-tag,
.crm-data-tag,
.crm-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #a8c9ee;
  border-radius: 5px;
  background: #eef6ff;
  color: #0d5ea8;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.crm-data-tag.origin { border-color: #d8c6a0; background: #f7f0e1; color: #725e35; }
.crm-status { border-color: #d9dde2; background: #f5f6f8; color: #4e5864; }
.crm-status.won { border-color: #acd9bc; background: #edf8f1; color: #207344; }
.crm-status.lost { border-color: #efb7b7; background: #fff0f0; color: #a42727; }
.crm-empty { padding: 22px !important; color: #7a8490; text-align: center; }
.crm-pagination { display: flex; justify-content: center; gap: 18px; padding: 14px; font-size: 12px; }
.crm-company-owner,
.crm-deal-meta { display: flex; align-items: flex-end; gap: 8px; }
.crm-company-owner { flex-direction: column; }
.crm-company-owner span { color: #6c7580; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.crm-tag-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.crm-actionbar { min-height: 54px; flex-wrap: wrap; }
.crm-company-editor {
  margin: 14px 0 18px;
  border-top: 1px solid #dfe3e8;
  border-bottom: 1px solid #dfe3e8;
  background: #fafbfc;
}
.crm-company-editor[hidden] { display: none; }
.crm-company-editor form { padding: 14px 12px 16px; }
.crm-company-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.crm-company-edit-grid label { min-width: 0; }
.crm-company-edit-grid label.wide { grid-column: 1 / -1; }
.crm-company-edit-grid input,
.crm-company-edit-grid textarea { margin: 5px 0 0; }
.crm-company-edit-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.crm-inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crm-inline-form select { width: 190px; }
.crm-inline-form input { width: min(320px, 50vw); }
.crm-create-popover { position: relative; }
.crm-create-popover > summary { list-style: none; }
.crm-create-popover > summary::-webkit-details-marker { display: none; }
.crm-create-popover[open] form {
  position: absolute;
  z-index: 3;
  top: 43px;
  right: 0;
  width: 330px;
  padding: 14px;
  border: 1px solid #d5dae0;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 28, 38, .14);
}
.crm-create-popover form label + label { margin-top: 10px; }
.crm-create-popover form button { margin-top: 10px; }
.crm-create-popover[open] > .crm-holding-manager {
  position: absolute;
  z-index: 4;
  top: 43px;
  right: 0;
  width: min(470px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 120px));
  padding: 14px;
  overflow: auto;
  border: 1px solid #d5dae0;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 28, 38, .14);
}
.crm-create-popover[open] .crm-holding-manager > form {
  position: static;
  width: auto;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid #e2e6eb;
  box-shadow: none;
}
.crm-create-popover[open] .crm-holding-manager > form + form { padding-top: 14px; }
.crm-holding-members { display: grid; gap: 0; }
.crm-holding-members > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
}
.crm-holding-members > div > span { min-width: 0; font-size: 11px; }
.crm-holding-members a { color: #2e3742; font-weight: 750; }
.crm-holding-members small { display: block; margin-top: 2px; color: #75808d; }
.crm-holding-members form { flex: 0 0 auto; }
.crm-holding-members .button { min-height: 28px; margin: 0; padding: 5px 8px; }
.crm-required-product {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #e2bd55;
  background: #fff8df;
  color: #76530a;
  font-size: 11px;
  font-weight: 750;
}
.crm-band { margin-top: 14px; padding: 16px 0 0; border-top: 1px solid #dfe3e8; }
.crm-band > h2 { margin-bottom: 10px; }
.crm-request-row { display: grid; grid-template-columns: 180px 170px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e9edf0; font-size: 12px; }
.crm-request-row form { display: flex; gap: 6px; }
.crm-dossier-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; }
.crm-data-list { margin: 0; }
.crm-data-list > div { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1.4fr); gap: 20px; padding: 9px 0; border-bottom: 1px dotted #d4d9df; }
.crm-data-list dt { color: #707a86; font-size: 11px; }
.crm-data-list dd { margin: 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.crm-simple-list > div { padding: 10px 0; border-bottom: 1px solid #e7eaee; }
.crm-simple-list strong,
.crm-simple-list span { display: block; }
.crm-simple-list strong { font-size: 12px; }
.crm-simple-list span { margin-top: 4px; color: #69737e; font-size: 11px; }
.crm-deal-toolbar { justify-content: flex-end; }
.crm-deal-toolbar label { display: flex; align-items: center; gap: 7px; color: #66717c; font-size: 11px; }
.crm-deal-toolbar label:first-of-type { flex: 1 1 auto; }
.crm-deal-toolbar label:first-of-type input { max-width: 520px; }
.crm-deal-toolbar select { width: 210px; }
.crm-deal-layout { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(430px, 1.05fr); gap: 22px; align-items: start; }
.crm-deal-activity-column,
.crm-deal-context { min-width: 0; border-top: 1px solid #dfe3e8; background: #fff; }
.crm-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid #e4e7eb; }
.crm-section-head h2 { margin: 0; }
.crm-activity-form { padding: 12px; border-bottom: 1px solid #dfe3e8; background: #fafbfc; }
.crm-activity-form > label { margin-top: 9px; }
.crm-activity-form > div:last-child { margin-top: 9px; text-align: right; }
.crm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.crm-timeline { padding: 2px 12px 14px; }
.crm-timeline-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid #e7eaee; }
.crm-timeline-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eef2f6; color: #4f5d6c; font-size: 11px; font-weight: 900; }
.crm-timeline-item header { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.crm-timeline-item time,
.crm-timeline-item span { color: #78828d; font-size: 10px; }
.crm-timeline-item p { margin: 6px 0 0; font-size: 12px; line-height: 1.4; }
.crm-next-step { margin-top: 8px; padding: 7px 9px; border-left: 2px solid #e60012; background: #faf5f5; color: #59636f; font-size: 10px; }
.crm-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid #dfe3e8; }
.crm-tabs button { flex: 0 0 auto; padding: 14px 11px 11px; border: 0; border-bottom: 2px solid transparent; background: #fff; color: #69737e; font-size: 11px; font-weight: 750; cursor: pointer; }
.crm-tabs button.active { border-color: #e60012; color: #171b20; }
.crm-tab-panel { display: none; min-height: 320px; padding: 16px; }
.crm-tab-panel.active { display: block; }
.app-global-header .crm-subnav a { border-bottom-width: 2px; }
.app-global-header .crm-subnav a.active {
  border-color: transparent;
  color: #171b20;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: #e60012;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.top-nav-mode .crm-tabs button.active,
.top-nav-mode .crm-reference-tabs button.active { border-color: #e60012; }
.analytics-tabs a.active::after { height: 2px; }
.crm-product-value { margin: 0; font-size: 18px; font-weight: 750; }
.crm-file-form { display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: end; gap: 7px; margin-bottom: 14px; }
.crm-file-form input { margin: 0; }
.muted { color: #747e89 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .crm-deal-layout,
  .crm-dossier-grid { grid-template-columns: 1fr; }
  .crm-request-row { grid-template-columns: 1fr 1fr; }
  .crm-request-row form { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .crm-page-head,
  .crm-company-head,
  .crm-deal-head { align-items: stretch; flex-direction: column; }
  .crm-company-owner,
  .crm-deal-meta { align-items: flex-start; }
  .crm-entity-head-actions,
  .crm-deal-actions { align-items: stretch; }
  .crm-deal-actions .crm-entity-matrix { align-self: flex-end; }
  .crm-deal-command-row { justify-content: flex-end; }
  .crm-entity-switcher { width: 100%; }
  .crm-entity-switcher a,
  .crm-entity-switcher span { flex: 1 1 0; text-align: center; }
  .crm-filterbar,
  .crm-deal-toolbar { align-items: stretch; flex-direction: column; }
  .crm-filterbar.multi select,
  .crm-deal-toolbar select,
  .crm-deal-toolbar label:first-of-type input { width: 100%; max-width: none; }
  .crm-deal-toolbar label { align-items: stretch; flex-direction: column; }
  .crm-data-list > div { grid-template-columns: 1fr; gap: 4px; }
  .crm-form-grid,
  .crm-file-form { grid-template-columns: 1fr; }
  .crm-company-edit-grid { grid-template-columns: 1fr; }
  .crm-company-edit-grid label.wide { grid-column: auto; }
  .crm-actionbar,
  .crm-create-popover { width: 100%; }
  .crm-create-popover > summary { width: 100%; }
  .crm-create-popover[open] form {
    position: static;
    width: 100%;
    margin-top: 8px;
    border: 1px solid #d5dae0;
    box-shadow: none;
  }
  .crm-create-popover[open] > .crm-holding-manager {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 8px;
    box-shadow: none;
  }
}
.instant-multiselect-tools {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border-bottom: 1px solid #e3e8ef;
}

.instant-multiselect-tools input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  color: #1f2937;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  font: inherit;
  letter-spacing: 0;
}

.instant-multiselect-reset {
  justify-self: start;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.instant-multiselect-reset:hover {
  color: #d9041c;
}

/* Shared visual hierarchy for filters and tabular headings. */
form[data-instant-filter],
.statistics-period,
.queue-search-panel,
.assigned-base-search,
.assigned-base-filter-group,
.crm-employee-filters,
.inn-search,
.nextgen-filters {
  background-color: var(--crm-filter-surface);
}

form[data-instant-filter] .activities-extra-filter > summary i {
  background-color: var(--crm-filter-surface);
  box-shadow: 0 0 0 8px var(--crm-filter-surface);
}

form[data-instant-filter] .activities-extra-filter > div {
  background-color: var(--crm-filter-surface);
}

.crm-mode .crm-table thead th,
.crm-table thead th,
.analytics-table-scroll thead th,
.analytics-table-scroll table thead th:first-child,
.work-funnel-detail-dialog thead th,
.nextgen-source-table thead th,
.source-health-header,
.table-head {
  background-color: var(--crm-table-header-surface);
}

/* BPM uses the same dense list language as the CRM reference tables. */
.bpm-list-page { color: #202936; }
.bpm-page-head { align-items: center; margin-bottom: 13px; }
.bpm-page-head h1 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: 0; }
.bpm-list-filterbar {
  grid-template-columns: minmax(0, 1fr);
}
.bpm-list-filterbar .activities-extra-filter > div {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}
.bpm-list-toolbar { margin: 10px 0 14px; }
.bpm-reference-table { min-width: 900px; table-layout: fixed; }
.bpm-reference-table th:nth-child(1) { width: 31%; }
.bpm-reference-table th:nth-child(2) { width: 14%; }
.bpm-reference-table th:nth-child(3),
.bpm-reference-table th:nth-child(4) { width: 14%; }
.bpm-reference-table th:nth-child(5) { width: 27%; }
.bpm-reference-table td { height: 62px; vertical-align: middle; }
.bpm-reference-table td:first-child { position: relative; border-left: 0; }
.bpm-reference-table .bpm-table-row > td:first-child::before {
  position: absolute;
  top: 6%;
  bottom: 6%;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--bpm-row-accent, transparent);
  content: "";
}
.bpm-reference-table .bpm-table-row + .bpm-table-row > td { border-top: 3px solid #fff; }
.bpm-reference-table .crm-entity-link,
.bpm-company-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #303947;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bpm-reference-table .crm-entity-link { text-decoration: none; }
.bpm-reference-table .crm-entity-link:hover { color: #d9041c; text-decoration: underline; text-underline-offset: 3px; }
.bpm-row-meta {
  display: flex !important;
  min-height: 18px;
  align-items: center;
  gap: 6px;
  margin-top: 4px !important;
}
.bpm-row-meta .access-owner-tag { max-width: 190px; }
.bpm-draft-label,
.bpm-result-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border: 1px solid #d5dce5;
  border-radius: 5px;
  background: #f3f5f8;
  color: #5f6b7a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.bpm-draft-label { min-height: 18px; padding: 2px 6px; }
.bpm-inn { color: #3a4553; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.bpm-reference-table time { color: #35404e; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.bpm-reference-table time small { font-weight: 600; }
.bpm-overdue-label { color: #ba2835 !important; font-weight: 800; }
.bpm-result-status.granted { border-color: #b6dcc5; background: #edf8f1; color: #237448; }
.bpm-result-status.denied { border-color: #efc1c5; background: #fff0f1; color: #ad2f3a; }
.bpm-result-status.pending { border-color: #cbd8e8; background: #f0f5fb; color: #456481; }
.bpm-result-status.cancelled { color: #697483; }
.bpm-resolution-form {
  display: grid;
  grid-template-columns: minmax(135px, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.bpm-resolution-form select,
.bpm-resolution-form .bpm-save-result {
  width: 100%;
  min-height: 34px;
  height: 34px;
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}
.bpm-resolution-form select { min-width: 0; padding: 6px 28px 6px 8px; }
.bpm-resolution-form .bpm-save-result { width: auto; padding: 6px 9px; }
.bpm-resolution-form .bpm-save-result:disabled { cursor: default; opacity: .46; }
.bpm-table-row.access-date-overdue > td { background: #fff; }
.bpm-table-row.access-date-overdue { --bpm-row-accent: #df4b57; }
.bpm-table-footer { min-width: 900px; }

@media (max-width: 1100px) {
  .bpm-list-filterbar .activities-extra-filter > div { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 700px) {
  .bpm-list-filterbar { grid-template-columns: minmax(0, 1fr); }
  .bpm-list-filterbar .activities-extra-filter > div { grid-template-columns: 1fr; }
  .bpm-page-head h1 { font-size: 21px; }
}
