@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-cyrillic-wght-normal.woff2")
    format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-latin-wght-normal.woff2")
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-cyrillic-wght-italic.woff2")
    format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-latin-wght-italic.woff2")
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* Alias used by the canonical card stylesheet. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-cyrillic-wght-normal.woff2")
    format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-latin-wght-normal.woff2")
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-cyrillic-wght-italic.woff2")
    format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter/inter-latin-wght-italic.woff2")
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --crm-canvas: #f7f9fc;
  --crm-board-canvas: #f4f4f4;
  --crm-surface: #ffffff;
  --crm-surface-subtle: #fbfcfe;
  --crm-surface-hover: #f0f0f0;
  --crm-text: #344054;
  --crm-text-strong: #071126;
  --crm-muted: #5d6b82;
  --crm-muted-light: #98a2b3;
  --crm-border: #d8e0ec;
  --crm-border-strong: #c5cfdd;
  --crm-accent: #0866ff;
  --crm-accent-hover: #0058e6;
  --crm-accent-active: #004dcc;
  --crm-accent-soft: #edf4ff;
  --crm-success: #16835f;
  --crm-success-soft: #ecfdf5;
  --crm-warning: #b7791f;
  --crm-warning-soft: #fffbeb;
  --crm-danger: #d92d20;
  --crm-danger-soft: #fff1f0;
  --crm-info: #2563eb;
  --crm-radius-xs: 6px;
  --crm-radius-sm: 8px;
  --crm-radius-md: 10px;
  --crm-radius-lg: 12px;
  --crm-radius-dialog: 16px;
  --crm-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --crm-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.07);
  --crm-shadow-dialog: 0 24px 64px rgba(15, 23, 42, 0.18);
  --crm-focus: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --crm-sidebar-width: 76px;
  --crm-topbar-height: 68px;
  --crm-mobile-nav-height: 70px;
  --crm-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
  --crm-nav-muted: #999;
  --crm-nav-icon: #808080;
  --crm-nav-active: #202020;
  --crm-nav-hover: #f5f5f5;
  --crm-nav-selected: #fff;
  --crm-nav-alert: #d92d20;
  --crm-z-sidebar: 1050;
  --crm-z-mobile-nav: 1050;
  --crm-z-backdrop: 2070;
  --crm-z-sheet: 2080;
}

html {
  color-scheme: light;
}

body.crm-app:not(.crm-page-board),
body.crm-auth,
body.crm-utility {
  font-family:
    "Inter Variable",
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--crm-text);
  background: var(--crm-canvas);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.crm-page-board {
  background: var(--crm-board-canvas);
}

.crm-app-nav,
body.crm-page-board > header {
  font-family:
    "Inter Variable",
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.crm-app {
  --voice-blue: var(--crm-accent);
  --voice-blue-soft: var(--crm-accent-soft);
  --voice-text: var(--crm-text);
  --voice-muted: var(--crm-muted);
  --voice-border: var(--crm-border);
  --voice-surface: var(--crm-surface);
  --voice-soft: var(--crm-surface-subtle);
  --voice-green: var(--crm-success);
  --voice-amber: var(--crm-warning);
  --voice-red: var(--crm-danger);
  --voice-radius: var(--crm-radius-md);
  --finance-bg: var(--crm-canvas);
  --finance-surface: var(--crm-surface);
  --finance-text: var(--crm-text);
  --finance-muted: var(--crm-muted);
  --finance-border: var(--crm-border);
  --finance-soft: var(--crm-surface-subtle);
  --finance-primary: var(--crm-accent);
  --finance-primary-soft: var(--crm-accent-soft);
  --finance-danger: var(--crm-danger);
  --finance-radius: var(--crm-radius-md);
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: var(--crm-topbar-height) 0 0 var(--crm-sidebar-width);
  overflow-x: hidden;
}

body.crm-app:not(.crm-page-board) {
  --bg: var(--crm-canvas);
  --card: var(--crm-surface);
  --text: var(--crm-text);
  --muted: var(--crm-muted);
  --line: var(--crm-border);
  --player-blue: #344054;
  --player-blue-dark: #1d2939;
  --player-text: var(--crm-text);
  --player-muted: var(--crm-muted);
  --player-line: var(--crm-border);
}

body.crm-app *,
body.crm-auth *,
body.crm-utility * {
  box-sizing: border-box;
}

body.crm-app a,
body.crm-auth a,
body.crm-utility a {
  text-underline-offset: 2px;
}

body.crm-app:not(.crm-page-board) :focus-visible,
body.crm-auth :focus-visible,
body.crm-utility :focus-visible {
  outline: 2px solid var(--crm-accent);
  outline-offset: 2px;
}

body.crm-page-board :focus-visible:not(.crm-card):not(.crm-card *) {
  outline: 0;
}

body.crm-app h1,
body.crm-app h2,
body.crm-app h3,
body.crm-app h4,
body.crm-app h5,
body.crm-app h6 {
  color: var(--crm-text-strong);
  letter-spacing: -0.018em;
}

body.crm-app h1,
body.crm-app .h1 {
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 720;
}

body.crm-app h2,
body.crm-app .h2 {
  font-weight: 680;
}

body.crm-app .text-muted,
body.crm-app .text-secondary {
  color: var(--crm-muted) !important;
}

/* Application navigation */

.crm-app-nav {
  display: contents;
}

.crm-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: var(--crm-z-sidebar);
  display: flex;
  width: var(--crm-sidebar-width);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  padding: 12px 6px max(12px, env(safe-area-inset-bottom, 0px));
  background: var(--crm-surface);
  border-right: 1px solid var(--crm-border);
}

/* Expanded navigation stays above chat and below contact/call layers. */
.crm-sidebar:has([data-crm-menu-toggle][aria-expanded="true"]) {
  z-index: 2180;
}

.crm-nav-create,
.crm-mobile-more__create {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: var(--crm-accent);
  border: 1px solid var(--crm-accent);
  border-radius: var(--crm-radius-sm);
  box-shadow: var(--crm-shadow-xs);
  font-family: "Inter Variable", sans-serif;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.crm-nav-create {
  margin: 15px 4px 13px;
}

.crm-nav-create:hover,
.crm-mobile-more__create:hover {
  color: #fff;
  background: var(--crm-accent-hover);
  border-color: var(--crm-accent-hover);
}

.crm-nav-create:active,
.crm-mobile-more__create:active {
  transform: translateY(1px);
}

.crm-sidebar__links {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--crm-border) transparent;
  overscroll-behavior: contain;
}

.crm-nav-link {
  position: relative;
  display: flex;
  min-height: 62px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 2px;
  color: var(--crm-nav-muted);
  border: 1px solid transparent;
  border-radius: var(--crm-radius-sm);
  font-family: "CRM Chat Roboto", Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.crm-nav-link i,
.crm-nav-link > .crm-nav-icon {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--crm-nav-icon);
  font-size: 20px;
  line-height: 22px;
  text-align: center;
}

.crm-nav-link > span:not(.crm-nav-unread) {
  display: block;
  width: 100%;
  overflow-wrap: normal;
}

.crm-nav-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.crm-app-nav .crm-nav-unread[data-crm-chat-unread] {
  position: absolute;
  top: 3px;
  right: 4px;
  display: grid;
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: var(--crm-nav-alert);
  border: 2px solid var(--crm-surface);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.crm-app-nav .crm-nav-unread[data-crm-chat-unread][hidden] { display: none; }

.crm-nav-link:hover {
  color: var(--crm-nav-active);
  background: var(--crm-nav-hover);
}

.crm-nav-link.is-active {
  color: var(--crm-nav-active);
  background: var(--crm-nav-selected);
  border-color: transparent;
  font-weight: 400;
}

.crm-nav-link.is-active i,
.crm-nav-link.is-active > .crm-nav-icon {
  color: inherit;
}

.crm-nav-link:focus-visible,
.crm-sidebar-profile > button:focus-visible {
  outline: 2px solid var(--crm-accent);
  outline-offset: -2px;
}

.crm-sidebar__footer {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--crm-border);
}

.crm-sidebar-more {
  position: relative;
}

.crm-sidebar-more > .crm-nav-link {
  width: 100%;
  background: transparent;
  cursor: pointer;
}

.crm-sidebar-more > .crm-nav-link[aria-expanded="true"] {
  color: var(--crm-nav-active);
  background: var(--crm-nav-hover);
}

.crm-sidebar-more .crm-sidebar-more__menu {
  top: auto;
  right: auto;
  bottom: 0;
  left: calc(100% + 12px);
  width: 248px;
  max-width: calc(100vw - 100px);
  max-height: calc(100dvh - 24px);
  padding: 8px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #333;
  background: #fff;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 6px 24px #07112626;
  scrollbar-width: thin;
}

.crm-sidebar-more__link {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 12px;
  padding: 7px 18px;
  color: #333;
  font: 400 15px/20px "CRM Chat Roboto", Roboto, Arial, sans-serif;
  text-decoration: none;
}

.crm-sidebar-more__link > i,
.crm-sidebar-more__link > .crm-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #808080;
  font-size: 20px;
  line-height: 20px;
}

.crm-sidebar-more__link:hover,
.crm-sidebar-more__link:focus-visible,
.crm-sidebar-more__link.is-active {
  color: #333;
  background: #f4f4f4;
}

.crm-sidebar-more__link:focus-visible {
  outline: 2px solid var(--crm-accent);
  outline-offset: -2px;
}

html.crm-chat-fullscreen .crm-sidebar-more > .crm-nav-link.is-active:not([aria-expanded="true"]) {
  color: var(--crm-nav-muted);
}

.crm-sidebar-profile {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.crm-sidebar-profile .crm-topbar-menu {
  top: auto;
  right: auto;
  bottom: 0;
  left: calc(100% + 12px);
  width: min(310px, calc(100vw - 100px));
}

html.crm-chat-fullscreen .crm-topbar {
  visibility: hidden;
  pointer-events: none;
}

html.crm-chat-fullscreen .crm-app-nav [data-crm-chat-open] {
  color: var(--crm-nav-active);
  background: var(--crm-nav-selected);
  font-weight: 400;
}

[data-crm-user-avatar] > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.crm-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.crm-user__avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  color: var(--crm-accent);
  background: var(--crm-accent-soft);
  border: 1px solid #dbe7ff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.crm-user__name {
  min-width: 0;
  overflow: hidden;
  color: var(--crm-text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-logout-form {
  margin: 0;
}

.crm-logout-button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--crm-muted);
  background: transparent;
  border: 0;
  border-radius: var(--crm-radius-sm);
  font:
    550 12px/1 "Inter Variable",
    sans-serif;
  cursor: pointer;
}

.crm-logout-button:hover {
  color: var(--crm-danger);
  background: var(--crm-danger-soft);
}

.crm-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--crm-sidebar-width);
  z-index: 1039;
  display: flex;
  height: var(--crm-topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--crm-border);
  backdrop-filter: blur(14px);
  transition: left 0.2s ease;
}

.crm-topbar__workspace {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  align-self: stretch;
  gap: 12px;
}

.crm-global-search {
  position: relative;
  display: flex;
  margin: 0;
  align-self: center;
  width: min(700px, 52vw);
  min-width: 260px;
  flex: 1 1 420px;
  max-width: 700px;
  height: 44px;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 9px 0 12px;
  color: var(--crm-muted);
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.crm-global-search:focus-within {
  border-color: #aeb9c8;
  box-shadow: 0 0 0 1px rgba(71, 84, 103, 0.08);
}

.crm-global-search > .bi-search {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.crm-global-search input {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  appearance: none;
  flex: 1 1 auto;
  height: 100%;
  padding: 0;
  color: var(--crm-text);
  background: transparent;
  border: 0;
  outline: 0;
  font:
    400 14px/1.3 "Inter Variable",
    sans-serif;
}

.crm-global-search input::placeholder {
  color: var(--crm-muted-light);
}

.crm-global-search input::-webkit-search-cancel-button,
.crm-contact-search-entry input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}

.crm-global-search input:focus-visible {
  outline: 0 !important;
}

.crm-global-search__clear {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  place-items: center;
  color: var(--crm-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
}

.crm-global-search__clear:hover {
  color: var(--crm-text);
  background: var(--crm-surface-hover);
}

.crm-global-search__clear[hidden] {
  display: none;
}

.crm-global-search__shortcut,
.crm-topbar-help kbd {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 6px;
  color: var(--crm-muted);
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: 5px;
  box-shadow: none;
  font:
    500 11px/1 "Inter Variable",
    sans-serif;
  white-space: nowrap;
}

.crm-contacts-view-switch {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--crm-surface-subtle);
  border: 1px solid var(--crm-border);
  border-radius: 10px;
}

.crm-contacts-view-switch__item {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--crm-muted);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}

.crm-contacts-view-switch__item:hover {
  color: var(--crm-text);
  background: #fff;
}

.crm-contacts-view-switch__item.is-active {
  color: var(--crm-accent);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.crm-topbar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.crm-topbar__create {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  color: #fff;
  background: var(--crm-accent);
  border: 1px solid var(--crm-accent);
  border-radius: 9px;
  box-shadow: 0 5px 12px rgba(8, 102, 255, 0.18);
  font:
    700 14px/1 "Inter Variable",
    sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.crm-topbar__create:hover {
  color: #fff;
  background: var(--crm-accent-hover);
  border-color: var(--crm-accent-hover);
}

.crm-topbar-popover {
  position: relative;
}

.crm-topbar__icon,
.crm-topbar__profile {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: #344054;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.crm-topbar__icon {
  font-size: 18px;
}

.crm-topbar__badge[hidden] { display: none; }

.crm-topbar__badge {
  position: absolute;
  top: 1px;
  right: -2px;
  display: inline-grid;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  place-items: center;
  color: #fff;
  background: #ef233c;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.crm-topbar__icon:hover,
.crm-topbar__profile:hover,
.crm-topbar__icon[aria-expanded="true"],
.crm-topbar__profile[aria-expanded="true"] {
  color: var(--crm-text-strong);
  background: var(--crm-surface-hover);
}

.crm-board-settings-toggle {
  flex: 0 0 40px;
  border: 1px solid var(--crm-border);
  border-radius: 9px;
}

.crm-board-stage-settings {
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  box-shadow: var(--crm-shadow-dialog);
}

.crm-board-stage-settings__label {
  margin: 0 0 10px;
  color: var(--crm-text-strong);
  font-weight: 650;
}

.crm-board-stage-settings__option {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.crm-board-stage-settings__option:hover:not(.is-unavailable) {
  background: var(--crm-surface-hover);
}

.crm-board-stage-settings__option .form-check-input {
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
}

.crm-board-stage-settings__option.is-unavailable {
  color: var(--crm-muted);
  cursor: not-allowed;
}

.crm-board-stage-settings__option small {
  margin-left: auto;
  font-size: 11px;
}

.crm-board-stage-settings__hint {
  margin: 12px 0 0;
  color: var(--crm-muted);
  font-size: 12px;
}

.crm-topbar__avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--crm-text-strong);
  background: #eaf0f9;
  border: 1px solid var(--crm-border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.crm-topbar__online {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  background: #12b76a;
  border: 2px solid #fff;
  border-radius: 50%;
}

.crm-topbar-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1100;
  display: block;
  width: 310px;
  padding: 7px;
  color: var(--crm-text);
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-sm);
}

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

.crm-topbar-menu__title {
  padding: 9px 10px 10px;
  color: var(--crm-text-strong);
  font-size: 14px;
  font-weight: 700;
}

.crm-topbar-menu__empty {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 10px 14px;
  color: var(--crm-muted);
}

.crm-topbar-menu__empty > i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--crm-success);
  background: var(--crm-success-soft);
  border-radius: 50%;
  font-size: 17px;
}

.crm-topbar-menu__empty strong,
.crm-topbar-menu__empty span {
  display: block;
}

.crm-topbar-menu__empty strong {
  margin-bottom: 2px;
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 650;
}

.crm-topbar-menu__empty span {
  font-size: 12px;
  line-height: 1.35;
}

.crm-notification-list {
  display: grid;
  gap: 2px;
  padding-bottom: 6px;
}

.crm-notification-item {
  display: grid;
  min-height: 50px;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 10px;
  color: var(--crm-text);
  border-radius: 7px;
  text-decoration: none;
}

.crm-notification-item:hover {
  color: var(--crm-text);
  background: var(--crm-surface-hover);
}

.crm-notification-item__dot {
  width: 7px;
  height: 7px;
  background: var(--crm-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--crm-accent-soft);
}

.crm-notification-item strong,
.crm-notification-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-notification-item strong {
  color: var(--crm-text-strong);
  font-size: 13px;
  font-weight: 650;
}

.crm-notification-item small {
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: 11px;
}

.crm-topbar-menu__footer {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--crm-accent);
  border-top: 1px solid var(--crm-border);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.crm-topbar-menu__footer:hover {
  color: var(--crm-accent-hover);
  background: var(--crm-accent-soft);
  border-radius: 0 0 7px 7px;
}

.crm-topbar-help {
  width: 250px;
}

.crm-topbar-help__row {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  color: var(--crm-muted);
  font-size: 13px;
}

.crm-profile-menu {
  width: 240px;
}

.crm-profile-menu__user {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 9px 12px;
  border-bottom: 1px solid var(--crm-border);
}

.crm-profile-menu__user strong,
.crm-profile-menu__user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-profile-menu__user strong {
  color: var(--crm-text-strong);
  font-size: 13px;
  font-weight: 700;
}

.crm-profile-menu__user span {
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: 11px;
}

.crm-profile-menu__link {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 0 10px;
  color: var(--crm-text);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font:
    500 13px/1 "Inter Variable",
    sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.crm-profile-menu__link:hover {
  color: var(--crm-text);
  background: var(--crm-surface-hover);
}

.crm-profile-menu__link.is-danger {
  color: var(--crm-danger);
}

.crm-profile-menu__link.is-danger:hover {
  background: var(--crm-danger-soft);
}

.crm-mobile-nav,
.crm-mobile-more,
.crm-mobile-more-backdrop {
  display: none;
}

/* Shared application components */

body.crm-app .container,
body.crm-app .container-fluid,
body.crm-app .container-lg,
body.crm-app .container-xl,
body.crm-app .container-xxl {
  --bs-gutter-x: 1.5rem;
}

body.crm-app .card {
  color: var(--crm-text);
  background: var(--crm-surface);
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius-lg);
  box-shadow: var(--crm-shadow-xs) !important;
}

body.crm-app .card-header,
body.crm-app .card-footer {
  background: var(--crm-surface) !important;
  border-color: var(--crm-border) !important;
}

body.crm-app .card-header {
  font-size: 14px;
  font-weight: 650;
}

body.crm-app .btn:not(.btn-close) {
  --bs-btn-font-family: "Inter Variable", sans-serif;
  --bs-btn-font-size: 14px;
  --bs-btn-font-weight: 620;
  min-height: 38px;
  border-radius: var(--crm-radius-sm);
  box-shadow: none;
}

body.crm-app .btn-sm:not(.btn-close) {
  min-height: 32px;
  font-size: 13px;
}

body.crm-app .btn-lg:not(.btn-close) {
  min-height: 44px;
  font-size: 15px;
}

body.crm-app .btn-primary {
  --bs-btn-bg: var(--crm-accent);
  --bs-btn-border-color: var(--crm-accent);
  --bs-btn-hover-bg: var(--crm-accent-hover);
  --bs-btn-hover-border-color: var(--crm-accent-hover);
  --bs-btn-active-bg: var(--crm-accent-active);
  --bs-btn-active-border-color: var(--crm-accent-active);
}

body.crm-app .btn-outline-primary {
  --bs-btn-color: var(--crm-accent);
  --bs-btn-border-color: #b8cdfb;
  --bs-btn-hover-bg: var(--crm-accent-soft);
  --bs-btn-hover-border-color: #93b4f8;
  --bs-btn-hover-color: var(--crm-accent-hover);
  --bs-btn-active-bg: var(--crm-accent);
}

body.crm-app .btn-light {
  --bs-btn-bg: var(--crm-surface);
  --bs-btn-border-color: var(--crm-border);
  --bs-btn-hover-bg: var(--crm-surface-hover);
  --bs-btn-hover-border-color: var(--crm-border-strong);
  --bs-btn-color: #475467;
}

body.crm-app .form-control,
body.crm-app .form-select,
body.crm-app .choices__inner {
  min-height: 38px;
  color: var(--crm-text);
  background-color: var(--crm-surface);
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  box-shadow: none;
  font-family: "Inter Variable", sans-serif;
  font-size: 14px;
}

body.crm-app textarea.form-control {
  min-height: 78px;
}

body.crm-app .form-control::placeholder {
  color: var(--crm-muted-light);
}

body.crm-app .form-control:focus,
body.crm-app .form-select:focus,
body.crm-app .choices.is-focused .choices__inner,
body.crm-app .choices.is-open .choices__inner {
  background-color: #fff;
  border-color: #7aa2f7;
  box-shadow: var(--crm-focus);
}

body.crm-app .form-label {
  margin-bottom: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

body.crm-app .form-text {
  color: var(--crm-muted);
  font-size: 12px;
}

body.crm-app .input-group-text {
  color: var(--crm-muted);
  background: var(--crm-surface-subtle);
  border-color: var(--crm-border-strong);
  font-size: 14px;
}

body.crm-app .form-check-input {
  width: 16px;
  height: 16px;
  margin-top: 0;
  border-color: #b8c2d1;
}

body.crm-app .form-check-input:checked {
  background-color: var(--crm-accent);
  border-color: var(--crm-accent);
}

body.crm-app .form-check-input:focus {
  border-color: #7aa2f7;
  box-shadow: var(--crm-focus);
}

/* Один и тот же способ раскрытия этапов для мыши, клавиатуры и касания. */
.crm-stage-parent-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.crm-stage-parent-row > .stage-filter-item,
.crm-stage-parent-option {
  flex: 1;
  min-width: 0;
}

.crm-stage-parent-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}

.crm-stage-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--crm-muted, #59677b);
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.crm-stage-expand[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}

.crm-stage-expand:hover,
.crm-stage-expand:active {
  background: var(--crm-surface-subtle, #f2f5fa);
}

.crm-stage-expand:focus-visible {
  outline: 2px solid var(--crm-accent, #0665ff);
  outline-offset: -2px;
}

.crm-stage-children[hidden] {
  display: none !important;
}

.crm-stage-child,
#stagesList .stage-filter-item {
  min-height: 44px;
  gap: 12px;
}

.crm-stage-children .crm-stage-child {
  padding-left: 36px;
}

.crm-stage-count {
  margin-left: auto;
  color: var(--crm-muted, #59677b);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crm-card__stage--substage > span {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.crm-stage-filter-control {
  width: 280px;
  flex: 2 1 240px;
  min-width: 0;
}

#stagesList {
  max-height: min(68dvh, 560px);
  overflow-y: auto;
  max-width: calc(100vw - 24px);
}

body.crm-app .dropdown-menu {
  padding: 6px;
  color: var(--crm-text);
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-sm) !important;
  font-size: 14px;
}

body.crm-app .dropdown-item {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: var(--crm-radius-xs);
  color: #344054;
}

body.crm-app .dropdown-item:hover,
body.crm-app .dropdown-item:focus {
  color: var(--crm-text);
  background: var(--crm-surface-hover);
}

body.crm-app .dropdown-item.active,
body.crm-app .dropdown-item:active {
  color: var(--crm-accent);
  background: var(--crm-accent-soft);
}

body.crm-app .alert {
  padding: 12px 14px;
  border-radius: var(--crm-radius-md);
  border-width: 1px;
  font-size: 14px;
}

body.crm-app .alert-success {
  color: #106b4d;
  background: var(--crm-success-soft);
  border-color: #b9ead7;
}

body.crm-app .alert-danger {
  color: #a82319;
  background: var(--crm-danger-soft);
  border-color: #f5c2bd;
}

body.crm-app .alert-warning {
  color: #8a5a12;
  background: var(--crm-warning-soft);
  border-color: #f2d69c;
}

body.crm-app .badge {
  border-radius: var(--crm-radius-xs);
  font-size: 12px;
  font-weight: 620;
}

body.crm-app .table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--crm-surface-hover);
  --bs-table-border-color: var(--crm-border);
  margin-bottom: 0;
  color: var(--crm-text);
  font-size: 14px;
}

body.crm-app .table > :not(caption) > * > * {
  padding: 11px 13px;
  border-bottom-color: var(--crm-border);
}

body.crm-app .table thead th,
body.crm-app .table-light th {
  color: var(--crm-muted);
  background: var(--crm-surface-subtle) !important;
  border-bottom-width: 1px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

body.crm-app .table-responsive {
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #c5cedb transparent;
}

body.crm-app .pagination .page-link {
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  color: #475467;
  background: #fff;
  border-color: var(--crm-border);
  font-size: 13px;
}

body.crm-app .pagination .active > .page-link {
  color: #fff;
  background: var(--crm-accent);
  border-color: var(--crm-accent);
}

/* Modal, offcanvas, toast and shared overlays */

body.crm-app .modal-backdrop.show,
body.crm-app .offcanvas-backdrop.show {
  opacity: 0.34;
}

body.crm-app .modal-content {
  color: var(--crm-text);
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-dialog);
  box-shadow: var(--crm-shadow-dialog);
}

body.crm-app .modal-header,
body.crm-app .modal-footer {
  padding: 16px 18px;
  border-color: var(--crm-border);
}

body.crm-app .modal-body {
  padding: 18px;
}

body.crm-app .modal-title {
  font-size: 17px !important;
  font-weight: 680;
}

body.crm-app .btn-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--crm-radius-sm);
  background-size: 11px;
}

body.crm-app .btn-close:hover {
  background-color: var(--crm-surface-hover);
}

body.crm-app .modal-unified .modal-content {
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-dialog);
  box-shadow: var(--crm-shadow-dialog);
}

body.crm-app .modal-unified .modal-body {
  padding: 22px 20px 16px;
  font-size: 15px;
  line-height: 1.5;
}

body.crm-app .modal-unified .px-4.pb-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 20px !important;
}

body.crm-app .modal-unified .btn {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--crm-radius-sm);
  font-size: 13px;
}

body.crm-app .offcanvas {
  color: var(--crm-text);
  background: var(--crm-surface);
  border-color: var(--crm-border);
}

body.crm-app .offcanvas-end {
  box-shadow: -20px 0 50px rgba(15, 23, 42, 0.1) !important;
}

body.crm-app .offcanvas-bottom {
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.1) !important;
}

body.crm-app #contactOffcanvas {
  width: min(650px, 100vw) !important;
  max-width: 100% !important;
  background: #f4f6f8;
  font-family: "Inter", sans-serif;
}

body.crm-app .offcanvas-header {
  padding: 16px 18px;
  border-color: var(--crm-border);
}

body.crm-app .toast-container {
  top: calc(var(--crm-topbar-height) + 18px) !important;
  right: 18px !important;
  bottom: auto !important;
  z-index: 2060 !important;
  padding: 0 !important;
}

body.crm-app .toast {
  min-width: min(360px, calc(100vw - 32px));
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-dialog);
  font-size: 14px;
}

body.crm-app .toast.text-bg-success {
  background: #13795b !important;
}

body.crm-app .toast.text-bg-danger {
  background: #c52b21 !important;
}

/* Board */

body.crm-page-board > header {
  position: sticky;
  top: var(--crm-topbar-height);
  z-index: 1020;
  padding: 12px 16px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--crm-border) !important;
  box-shadow: none !important;
  background-clip: border-box;
}

body.crm-page-board > header > .container-fluid {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

body.crm-page-board > main {
  margin-top: 0 !important;
  padding: 16px 16px 42px !important;
}

body.crm-page-board .input-group.shadow-sm {
  box-shadow: none !important;
}

body.crm-page-board .input-group:focus-within {
  border-color: #aeb9c8;
  box-shadow: 0 0 0 1px rgba(71, 84, 103, 0.08) !important;
}

body.crm-page-board .app-search-input:focus,
body.crm-page-board .app-search-input:focus-visible {
  outline: 0 !important;
  border-color: var(--crm-border-strong);
  box-shadow: none !important;
}

body.crm-page-board .input-group .form-control,
body.crm-page-board .input-group .input-group-text,
body.crm-page-board .input-group .btn {
  min-height: 40px;
}

body.crm-page-board #filterBtn,
body.crm-page-board #stageBtn {
  min-height: 40px;
  color: #475467;
  background: #fff;
  border-color: var(--crm-border-strong);
}

body.crm-page-board #filterBtn:focus,
body.crm-page-board #stageBtn:focus,
body.crm-page-board #filterBtn.show,
body.crm-page-board #stageBtn.show {
  outline: 0;
  border-color: #aeb9c8;
  box-shadow: none !important;
}

body.crm-page-board #filterBtn.is-active,
body.crm-page-board #stageBtn.is-active,
body.crm-page-board .crm-mobile-contact-filter-status__open.is-active {
  color: #1769e0;
  background: #edf4ff;
  border-color: #c9dafd;
}

body.crm-page-board .crm-mobile-add-contact {
  width: 42px;
  min-width: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  body.crm-page-board .crm-board-local-search {
    display: none;
  }

  body.crm-page-board > header .row {
    justify-content: flex-end;
  }
}

/* Unified contacts controls */

body.crm-page-board > header.crm-contact-controls > .container-fluid {
  padding: 0;
}

.crm-contact-quick-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.crm-contact-quick-filters__pill {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
}

.crm-contact-quick-filter {
  min-width: 180px;
}

.crm-contact-filter-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  display: block;
  width: 9px;
  height: 9px;
  background: var(--crm-accent);
  border: 2px solid #fff;
  border-radius: 50%;
}

.crm-contact-filter-dot[hidden] {
  display: none;
}

@media (min-width: 992px) {
  .crm-contact-filter-dot.has-initial {
    top: -7px;
    right: -7px;
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    color: #fff;
    font-size: 9px;
    font-weight: 750;
    line-height: 1;
  }
}

.crm-contact-advanced-filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.crm-contact-advanced-filters__header h2 {
  margin: 0;
  color: var(--crm-text-strong);
  font-size: 20px;
  font-weight: 720;
}

.crm-contact-advanced-filters__eyebrow {
  margin-bottom: 2px;
  color: var(--crm-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-contact-advanced-filters__body {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 8px;
}

.crm-contact-filter-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.crm-contact-filter-field legend,
.crm-contact-filter-field__label {
  display: block;
  width: auto;
  margin: 0 0 5px;
  padding: 0;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.crm-contact-filter-period,
.crm-contact-filter-duration {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 6px;
}

.crm-contact-filter-period label,
.crm-contact-filter-duration label {
  min-width: 0;
}

.crm-contact-filter-period label > span,
.crm-contact-filter-duration label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crm-contact-filter-field .form-control,
.crm-contact-filter-field .form-select {
  min-height: 40px;
  color: var(--crm-text);
  background-color: #fff;
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  box-shadow: none;
  font-size: 13px;
}

.crm-contact-filter-field .form-control:focus,
.crm-contact-filter-field .form-select:focus {
  border-color: #aeb9c8;
  box-shadow: 0 0 0 1px rgba(71, 84, 103, 0.08);
}

.crm-contact-date-range-control {
  position: relative;
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  padding-right: 34px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  transition: border-color 0.16s ease;
}

.crm-contact-date-range-control:focus-within,
.crm-contact-date-range-control.filter-active {
  border-color: #aeb9c8;
}

.crm-contact-date-range-control .input-group-text {
  min-height: 0;
  padding: 0 4px 0 11px;
  color: #64748b;
  background: transparent;
  border: 0;
  font-size: 14px;
}

.crm-contact-date-range-control .form-control {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
  min-height: 36px;
  padding: 0 2px 0 4px;
  color: #475569;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  font-size: 14px;
  text-overflow: ellipsis;
}

.crm-contact-date-range-control .form-control::placeholder {
  color: #94a3b8;
}

.crm-contact-date-range-control .clear-btn {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: none;
  width: 34px;
  height: auto;
  padding: 0;
  place-items: center;
  color: #94a3b8;
  background: transparent;
  border: 0;
  font-size: 12px;
}

.crm-contact-date-range-control .clear-btn:hover {
  color: var(--crm-danger);
}

.crm-contact-compact-dropdown,
.crm-contact-compact-dropdown > .filter-control {
  width: 100%;
}

.crm-contact-compact-dropdown > .filter-control {
  min-height: 38px;
  padding: 0 11px;
  justify-content: space-between;
  overflow: hidden;
  color: #64748b;
  background: #fff;
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  box-shadow: none !important;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.crm-contact-compact-dropdown > .filter-control:hover {
  color: #475569;
  background: #fff;
  border-color: #aeb9c8;
}

.crm-contact-compact-dropdown > .filter-control:focus,
.crm-contact-compact-dropdown > .filter-control.show {
  color: #475569;
  background: #fff;
  border-color: #aeb9c8;
  box-shadow: none !important;
}

.crm-contact-compact-dropdown > .filter-control.filter-active {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.crm-contact-compact-dropdown .region-filter-toggle {
  display: flex;
  align-items: center;
}

.crm-contact-compact-dropdown .region-filter-toggle__content,
.crm-contact-duration-filter__toggle-content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.crm-contact-compact-dropdown .region-filter-toggle__content > i,
.crm-contact-duration-filter__toggle-content > i {
  flex: 0 0 auto;
}

.crm-contact-compact-dropdown .region-filter-toggle__label,
.crm-contact-duration-filter__toggle-content > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-contact-compact-dropdown .region-filter-toggle__chevron {
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 11px;
}

.crm-contact-duration-filter__toggle::after {
  flex: 0 0 auto;
  margin-left: 8px;
  align-self: center;
}

.crm-contact-duration-filter__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.crm-contact-duration-filter__toggle-content {
  white-space: nowrap;
}

.crm-contact-filter-menu {
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 0;
  overflow: hidden;
  color: #334155;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
}

.crm-contact-filter-menu__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid #edf1f5;
}

.crm-contact-filter-menu__header strong {
  display: block;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.crm-contact-filter-menu__header small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.25;
}

.crm-contact-filter-menu__reset {
  flex: 0 0 auto;
  padding: 1px 0;
  color: #64748b;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 600;
}

.crm-contact-filter-menu__reset:hover {
  color: var(--crm-danger);
}

.crm-contact-filter-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #edf1f5;
  font-size: 12px;
}

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

.crm-contact-filter-menu__footer .btn {
  min-width: 94px;
  min-height: 34px;
  padding-block: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
}

.crm-contact-manager-filter .crm-contact-manager-options {
  min-height: 0;
  max-height: 286px;
  align-items: stretch;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  overflow-y: auto;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.crm-contact-manager-filter .crm-contact-manager-option {
  width: 100%;
  min-height: 36px;
}

.crm-contact-manager-filter .crm-contact-manager-option span {
  width: 100%;
  min-height: 36px;
  padding: 0 10px 0 34px;
  color: #334155;
  background: #fff;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
}

.crm-contact-manager-filter .crm-contact-manager-option .form-check-input {
  top: 50%;
  left: 12px;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin: -8px 0 0;
  opacity: 1;
  pointer-events: auto;
}

.crm-contact-manager-filter .crm-contact-manager-option:hover span {
  background: #f1f5f9;
}

.crm-contact-manager-filter .crm-contact-manager-option .form-check-input:checked + span {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: transparent;
}

.crm-contact-duration-filter__menu {
  width: 340px;
}

.crm-contact-duration-filter .crm-contact-filter-duration {
  padding: 12px 14px;
  gap: 10px;
}

.crm-contact-duration-filter .crm-contact-filter-duration label > span {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 5px;
  overflow: visible;
  clip: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
}

.crm-contact-duration-filter .input-group .form-control {
  min-width: 0;
  min-height: 38px;
  border-color: #e2e8f0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.crm-contact-duration-filter .input-group-text {
  padding-inline: 8px;
  color: #64748b;
  background: #f8fafc;
  border-color: #e2e8f0;
  font-size: 12px;
}

.crm-contact-filter-field--period {
  width: 246px;
}

.crm-contact-filter-field--managers {
  min-width: 210px;
  max-width: 300px;
}

.crm-contact-filter-field--duration {
  width: 210px;
}

.crm-contact-filter-field--sort {
  width: 226px;
}

.crm-contact-manager-options {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 5px;
  padding: 4px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  scrollbar-width: thin;
}

.crm-contact-manager-option {
  position: relative;
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  cursor: pointer;
}

.crm-contact-manager-option .form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.crm-contact-manager-option span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 9px;
  color: var(--crm-muted);
  background: var(--crm-surface-subtle);
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.crm-contact-manager-option .form-check-input:checked + span {
  color: var(--crm-accent);
  background: var(--crm-accent-soft);
  border-color: #c9dafd;
}

.crm-contact-manager-option .form-check-input:focus-visible + span {
  outline: 1px solid #aeb9c8;
  outline-offset: 1px;
}

body.crm-page-board .form-control:focus,
body.crm-page-board .form-select:focus,
body.crm-page-board .choices.is-focused .choices__inner,
body.crm-page-board .choices.is-open .choices__inner {
  border-color: #aeb9c8;
  box-shadow: none !important;
}

body.crm-page-board .form-check-input:focus,
body.crm-page-board .crm-contact-controls button:focus,
body.crm-page-board .crm-contact-controls button:focus-visible,
body.crm-page-board .crm-contact-advanced-filters button:focus,
body.crm-page-board .crm-contact-advanced-filters button:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.crm-contact-advanced-filters__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.crm-contact-advanced-filters__actions .btn {
  min-height: 40px;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.crm-contact-search-entry .input-group {
  overflow: hidden;
  border-radius: var(--crm-radius-sm);
}

.crm-contact-search-entry__back {
  display: none;
}

.crm-contact-search-prompt {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px 20px;
  color: var(--crm-muted);
  text-align: center;
}

.crm-contact-search-prompt__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  place-items: center;
  color: var(--crm-accent);
  background: var(--crm-accent-soft);
  border-radius: 17px;
  font-size: 23px;
}

.crm-contact-search-prompt strong {
  color: var(--crm-text-strong);
  font-size: 16px;
}

.crm-contact-search-prompt span:last-child {
  font-size: 13px;
}

@media (min-width: 992px) {
  body.crm-page-board > header.crm-contact-controls > .container-fluid {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filters {
    flex: 0 1 394px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter--change {
    order: 1;
    flex: 1 1 206px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter--stage {
    order: 2;
    flex: 1 1 180px;
  }

  body.crm-page-board:not(.crm-page-contact-search) #filterBtn,
  body.crm-page-board:not(.crm-page-contact-search) #stageBtn {
    min-height: 38px;
    padding: 0 11px;
    color: #64748b;
    background: #fff;
    border-color: var(--crm-border-strong);
    border-radius: var(--crm-radius-sm);
    font-size: 14px;
    font-weight: 500;
  }

  body.crm-page-board .crm-contact-advanced-filters.offcanvas {
    position: static !important;
    z-index: auto !important;
    display: flex !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    max-width: none !important;
    flex: 1 1 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
    overflow: visible !important;
    background: transparent;
    border: 0;
    transform: none !important;
    transition: none !important;
  }

  body.crm-page-board .crm-contact-advanced-filters__header {
    display: none;
  }

  body.crm-page-board .crm-contact-advanced-filters__body {
    flex: 1 1 0;
    flex-wrap: nowrap;
  }

  body.crm-page-board .crm-contact-filter-field > legend,
  body.crm-page-board .crm-contact-filter-field > .crm-contact-filter-field__label {
    display: none;
  }

  body.crm-page-board .crm-contact-filter-field--period {
    width: auto;
    min-width: 230px;
    flex: 1.25 1 246px;
  }

  body.crm-page-board .crm-contact-filter-field--managers {
    width: auto;
    min-width: 142px;
    max-width: 180px;
    flex: 1 1 170px;
  }

  body.crm-page-board .crm-contact-filter-field--duration {
    width: auto;
    min-width: 190px;
    flex: 1 1 210px;
  }

  body.crm-page-board .crm-contact-filter-field--sort {
    width: auto;
    min-width: 190px;
    flex: 1 1 218px;
  }

  body.crm-page-board .crm-contact-filter-field--sort .form-select {
    min-height: 38px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 14px;
  }

  body.crm-page-board .crm-contact-advanced-filters__actions {
    flex: 0 0 auto;
  }

  body.crm-page-board .crm-contact-advanced-filters__actions .btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  body.crm-page-contact-search .crm-contact-quick-filters {
    margin-left: auto;
  }
}

@media (min-width: 992px) and (max-width: 1699.98px) {
  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filters {
    flex-basis: 300px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter {
    min-width: 0;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter--change {
    flex-basis: 160px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter--stage {
    flex-basis: 132px;
  }

  body.crm-page-board .crm-contact-filter-field--period {
    min-width: 190px;
  }

  body.crm-page-board .crm-contact-filter-field--managers {
    min-width: 130px;
  }

  body.crm-page-board .crm-contact-filter-field--duration {
    min-width: 165px;
  }

  body.crm-page-board .crm-contact-filter-field--sort {
    min-width: 160px;
  }

  body.crm-page-board .crm-contact-advanced-filters__actions .btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  body.crm-page-board .crm-contact-advanced-filters__actions .btn > span {
    display: none;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filters {
    flex-basis: 238px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter--change {
    flex-basis: 130px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter--stage {
    flex-basis: 100px;
  }

  body.crm-page-board .crm-contact-filter-field--period {
    min-width: 130px;
  }

  body.crm-page-board .crm-contact-filter-field--managers {
    min-width: 110px;
  }

  body.crm-page-board .crm-contact-filter-field--duration {
    min-width: 120px;
  }

  body.crm-page-board .crm-contact-filter-field--sort {
    min-width: 130px;
  }
}

/* Contacts table */

body.crm-page-table > main {
  max-width: 1760px;
  margin: 0 auto !important;
  padding: 16px 16px 42px !important;
}

body.crm-page-table > header {
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.crm-page-table .filters-wrapper {
  gap: 8px !important;
  margin-bottom: 14px;
}

body.crm-page-table .filter-control:not(#exportExcelBtn),
body.crm-page-table .custom-search-group,
body.crm-page-table .custom-date-group,
body.crm-page-table .choices__inner {
  min-height: 38px;
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  background: #fff;
}

body.crm-page-table .custom-search-group:focus-within,
body.crm-page-table .custom-date-group:focus-within {
  border-color: #aeb9c8;
  box-shadow: 0 0 0 1px rgba(71, 84, 103, 0.08);
}

body.crm-page-table .custom-search-group input:focus-visible,
body.crm-page-table .custom-date-group input:focus-visible,
body.crm-page-table .choices:focus-visible,
body.crm-page-table .choices input:focus-visible {
  outline: 0;
}

body.crm-page-table .choices.is-focused .choices__inner,
body.crm-page-table .choices.is-open .choices__inner {
  border-color: #aeb9c8;
  box-shadow: none;
}

body.crm-page-table .choices__list--multiple .choices__item {
  color: var(--crm-accent);
  background: var(--crm-accent-soft);
  border: 1px solid #c9dafd;
  border-radius: var(--crm-radius-xs);
}

body.crm-page-table
  .choices[data-type*="select-multiple"]
  .choices__button {
  width: 14px;
  height: 18px;
  margin: 0 -2px 0 7px;
  padding-left: 14px;
  opacity: 1;
  border-left-color: #b8cdfb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2L2 8' fill='none' stroke='%232563eb' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center right;
  background-size: 10px 10px;
}

body.crm-page-table
  .choices[data-type*="select-multiple"]
  .choices__button:hover,
body.crm-page-table
  .choices[data-type*="select-multiple"]
  .choices__button:focus {
  opacity: 1;
  filter: brightness(0.75);
}

body.crm-page-table #exportExcelBtn {
  min-width: 112px;
  color: #fff;
  background: #16835f;
  border-color: #16835f;
}

body.crm-page-table #exportExcelBtn:hover,
body.crm-page-table #exportExcelBtn:focus {
  color: #fff;
  background: #116c4e;
  border-color: #116c4e;
  box-shadow: none;
}

body.crm-page-table #contactsTable {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-xs);
}

body.crm-page-table #contactsTable.tabulator,
body.crm-page-analytics .tabulator,
body.crm-page-voice .tabulator {
  color: var(--crm-text);
  background: #fff;
  border: 0;
  font-family: "Inter Variable", sans-serif;
  font-size: 13px;
}

body.crm-page-table #contactsTable .tabulator-header,
body.crm-page-analytics .tabulator-header,
body.crm-page-voice .tabulator-header {
  color: var(--crm-muted);
  background: var(--crm-surface-subtle) !important;
  border-bottom: 1px solid var(--crm-border) !important;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

body.crm-page-table #contactsTable .tabulator-col,
body.crm-page-analytics .tabulator-col,
body.crm-page-voice .tabulator-col {
  background: transparent !important;
  border-right-color: var(--crm-border) !important;
}

body.crm-page-table #contactsTable .tabulator-row,
body.crm-page-analytics .tabulator-row,
body.crm-page-voice .tabulator-row {
  min-height: 45px;
  background: #fff;
  border-bottom: 1px solid var(--crm-border) !important;
}

body.crm-page-table #contactsTable .tabulator-row:hover,
body.crm-page-analytics .tabulator-row:hover,
body.crm-page-voice .tabulator-row:hover {
  background: var(--crm-surface-hover) !important;
}

body.crm-page-table #contactsTable .tabulator-cell,
body.crm-page-analytics .tabulator-cell,
body.crm-page-voice .tabulator-cell {
  padding: 9px 11px !important;
  border-right-color: #edf1f6 !important;
}

body.crm-page-table #table-pagination-container {
  min-height: 38px;
}

body.crm-page-table #massActionPanel {
  left: calc(50% + (var(--crm-sidebar-width) / 2)) !important;
  bottom: 18px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  background: #fff !important;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius-lg) !important;
  box-shadow: var(--crm-shadow-dialog) !important;
}

body.crm-page-table .region-filter-menu,
body.crm-page-table .audio-duration-filter__menu {
  border-color: var(--crm-border);
  border-radius: var(--crm-radius-md);
}

body.crm-page-table .region-filter-option:hover {
  background: var(--crm-surface-hover);
}

/* Analytics */

body.crm-page-analytics {
  display: block !important;
  height: auto !important;
  min-height: 100dvh !important;
  overflow: auto !important;
}

body.crm-page-analytics .control-panel {
  position: sticky;
  top: var(--crm-topbar-height);
  z-index: 1010;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--crm-border);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

body.crm-page-analytics .filter-group {
  min-width: 210px;
}

body.crm-page-analytics .filter-group label {
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

body.crm-page-analytics .dashboard-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.8fr);
  gap: 16px;
  min-height: calc(100dvh - 82px);
  padding: 18px 20px 28px;
  overflow: visible !important;
}

body.crm-page-analytics .table-panel,
body.crm-page-analytics .widget-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-xs);
}

body.crm-page-analytics .table-panel {
  min-height: 620px;
  overflow: hidden;
}

body.crm-page-analytics .charts-panel {
  display: grid !important;
  grid-template-rows: minmax(240px, auto) minmax(280px, 1fr);
  gap: 16px;
  overflow: visible !important;
}

body.crm-page-analytics .widget-card {
  padding: 15px;
}

body.crm-page-analytics .widget-title {
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 650;
}

body.crm-page-analytics .kpi-grid {
  gap: 8px;
}

body.crm-page-analytics .kpi-box {
  min-height: 76px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
}

body.crm-page-analytics .kpi-box-title {
  color: var(--crm-muted);
  font-size: 9px;
  font-weight: 650;
}

body.crm-page-analytics .kpi-box-val {
  color: var(--crm-text-strong);
  font-size: 19px;
  font-weight: 720;
}

body.crm-page-analytics .drilldown-item {
  border-color: var(--crm-border);
  border-left-color: var(--crm-accent);
  border-radius: var(--crm-radius-sm);
  box-shadow: none;
}

/* Finance */

body.crm-page-finance .finance-page {
  max-width: 1760px;
  padding: 24px 24px 48px;
}

body.crm-page-finance .finance-title {
  color: var(--crm-text-strong);
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 720;
}

body.crm-page-finance .finance-btn {
  min-height: 38px;
  border-radius: var(--crm-radius-sm);
  font-size: 13px;
}

body.crm-page-finance .finance-periods,
body.crm-page-finance .finance-summary,
body.crm-page-finance .finance-filters,
body.crm-page-finance .finance-ledger,
body.crm-page-finance .finance-mobile-card,
body.crm-page-finance .finance-install {
  border-color: var(--crm-border);
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-xs);
}

body.crm-page-finance .finance-period-button.active,
body.crm-page-finance .finance-quick-category.active {
  color: var(--crm-accent);
  background: var(--crm-accent-soft);
  border-color: #b8cdfb;
}

body.crm-page-finance .finance-summary-value.primary,
body.crm-page-finance .finance-page-button.active {
  color: var(--crm-accent);
}

body.crm-page-finance .finance-table thead th {
  color: var(--crm-muted);
  background: var(--crm-surface-subtle);
}

body.crm-page-finance .finance-detail-canvas {
  width: min(540px, 100vw) !important;
}

body.crm-page-finance .finance-dropdown-menu {
  border-color: var(--crm-border);
  border-radius: var(--crm-radius-md);
}

/* Documents, settings, managers and history */

body.crm-page-documents .documents-admin,
body.crm-page-document-companies .documents-admin {
  max-width: 1560px;
  padding: 24px 24px 48px !important;
}

body.crm-page-documents .documents-admin > div:first-child,
body.crm-page-document-companies .documents-admin > div:first-child {
  padding-bottom: 4px;
}

body.crm-page-documents .candidate-card {
  background: var(--crm-surface-subtle) !important;
  border-color: var(--crm-border) !important;
  border-radius: var(--crm-radius-md) !important;
}

body.crm-page-documents .documents-history .list-group-item,
body.crm-page-document-companies .list-group-item {
  background: #fff;
  border-color: var(--crm-border);
}

body.crm-page-documents .documents-history .list-group-item:hover,
body.crm-page-document-companies .list-group-item:hover {
  background: var(--crm-surface-hover);
}

body.crm-page-document-companies .documents-sticky {
  top: calc(var(--crm-topbar-height) + 20px);
}

body.crm-page-history > main {
  max-width: 1760px;
  margin: 0 auto;
  padding: 16px 16px 46px !important;
}

body.crm-page-managers > .container,
body.crm-page-settings > .container {
  max-width: 1260px;
  margin-top: 0 !important;
  padding: 24px 24px 48px !important;
}

body.crm-page-managers > .container > .card {
  overflow: visible;
}

body.crm-page-managers .row.bg-light {
  background: var(--crm-surface-subtle) !important;
  border-color: var(--crm-border) !important;
  border-radius: var(--crm-radius-md) !important;
}

body.crm-page-managers [id^="resetPass"] {
  z-index: 20 !important;
  border-color: var(--crm-border) !important;
  border-radius: var(--crm-radius-sm) !important;
  box-shadow: var(--crm-shadow-sm) !important;
}

body.crm-page-settings .table td[colspan="4"] {
  padding: 10px 12px;
}

/* Voice center */

body.crm-page-voice {
  background: var(--crm-canvas) !important;
}

body.crm-page-voice .voice-shell {
  max-width: 1760px;
  padding: 16px 16px 48px;
}

body.crm-page-voice .voice-title {
  color: var(--crm-text-strong);
  font-size: 28px;
  font-weight: 720;
}

body.crm-page-voice .voice-module-nav {
  gap: 22px;
  border-color: var(--crm-border);
}

body.crm-page-voice .voice-module-link {
  color: #475467;
  font-size: 13px;
}

body.crm-page-voice .voice-module-link.is-active {
  color: var(--crm-accent);
}

body.crm-page-voice .voice-summary,
body.crm-page-voice .voice-panel,
body.crm-page-voice .voice-line-editor,
body.crm-page-voice .voice-note {
  border-color: var(--crm-border);
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-xs);
}

body.crm-page-voice .voice-summary-item {
  padding: 14px 17px;
  border-color: var(--crm-border);
}

body.crm-page-voice .voice-summary-label {
  color: var(--crm-muted);
  font-size: 11px;
}

body.crm-page-voice .voice-summary-value {
  font-size: 23px;
  font-weight: 700;
}

body.crm-page-voice .voice-btn {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  color: #475467;
  background: #fff;
  font-family: "Inter Variable", sans-serif;
  font-size: 12px;
  font-weight: 620;
}

body.crm-page-voice .voice-btn:hover {
  color: var(--crm-text);
  background: var(--crm-surface-hover);
  border-color: #aeb9c8;
}

body.crm-page-voice .voice-btn.primary {
  color: #fff;
  background: var(--crm-accent);
  border-color: var(--crm-accent);
}

body.crm-page-voice .voice-btn.primary:hover {
  background: var(--crm-accent-hover);
  border-color: var(--crm-accent-hover);
}

body.crm-page-voice .voice-btn.danger {
  color: var(--crm-danger);
  background: #fff;
  border-color: #f1bbb6;
}

body.crm-page-voice .voice-control,
body.crm-page-voice .voice-search input {
  min-height: 38px;
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  font-family: "Inter Variable", sans-serif;
  font-size: 13px;
}

body.crm-page-voice .voice-detail {
  border-color: var(--crm-border);
  border-radius: var(--crm-radius-md);
}

body.crm-page-voice .voice-mobile-row,
body.crm-page-voice .voice-mobile-list {
  border-color: var(--crm-border);
}

body.crm-page-voice .voice-toast {
  top: calc(
    var(--crm-topbar-height) + 18px + var(--crm-app-toast-height, 0px) +
      var(--crm-app-toast-gap, 0px)
  );
  right: 18px;
  bottom: auto;
  z-index: 2060;
  border-radius: var(--crm-radius-md);
  box-shadow: var(--crm-shadow-dialog);
}

/* Audio dock and editors */

body.crm-app .call-audio-dock {
  left: calc(var(--crm-sidebar-width) + 18px);
  right: 18px;
  bottom: 18px;
  min-height: 74px;
  border-color: var(--crm-border);
  border-radius: var(--crm-radius-lg);
  box-shadow: var(--crm-shadow-dialog);
}

body.crm-blocking-overlay-open .call-audio-dock {
  z-index: 1038 !important;
  pointer-events: none !important;
}

body.crm-app .call-audio-dock__toggle {
  background: #344054;
}

body.crm-app .call-audio-dock__toggle:hover {
  background: #1d2939;
}

body.crm-page-table.crm-mass-actions-visible .call-audio-dock {
  bottom: calc(var(--crm-mass-panel-height, 0px) + 30px);
}

/* Login and maintenance */

body.crm-auth,
body.crm-utility {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--crm-canvas) !important;
}

body.crm-auth .container {
  max-width: 520px;
}

body.crm-auth .row {
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  margin-top: 0 !important;
}

body.crm-auth .col-md-4 {
  width: 100%;
}

body.crm-auth .card {
  margin-top: 0 !important;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius-dialog) !important;
  box-shadow: var(--crm-shadow-dialog) !important;
}

body.crm-auth .card-header {
  padding: 24px 28px 18px !important;
  color: var(--crm-text-strong) !important;
  background: #fff !important;
  border-bottom: 1px solid var(--crm-border);
  text-align: left !important;
}

body.crm-auth .card-header h5 {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

body.crm-auth .card-body {
  padding: 24px 28px 28px !important;
}

body.crm-auth .form-label {
  color: #475467 !important;
  font-size: 12px;
  font-weight: 620;
}

body.crm-auth .form-control {
  min-height: 46px;
  border-color: var(--crm-border-strong);
  border-radius: var(--crm-radius-sm);
  box-shadow: none;
  font:
    500 14px/1.2 "Inter Variable",
    sans-serif;
}

body.crm-auth .form-control:focus {
  border-color: #7aa2f7;
  box-shadow: var(--crm-focus);
}

body.crm-auth .btn-primary {
  min-height: 46px;
  background: var(--crm-accent);
  border-color: var(--crm-accent);
  border-radius: var(--crm-radius-sm);
  box-shadow: none;
  font:
    650 14px/1.2 "Inter Variable",
    sans-serif;
}

body.crm-auth .btn-primary:hover {
  background: var(--crm-accent-hover);
  border-color: var(--crm-accent-hover);
}

body.crm-utility {
  display: grid !important;
  max-width: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 28px !important;
  place-items: center;
}

body.crm-utility > .container,
body.crm-utility > main,
body.crm-utility > form,
body.crm-utility > div {
  width: min(100%, 760px);
}

body.crm-utility .card {
  background: #fff;
  border: 1px solid var(--crm-border) !important;
  border-radius: var(--crm-radius-dialog) !important;
  box-shadow: var(--crm-shadow-sm) !important;
}

body.crm-utility .btn-primary {
  background: var(--crm-accent);
  border-color: var(--crm-accent);
}

/* Tablet and mobile navigation */

@media (max-width: 1199.98px) {
  .crm-topbar {
    gap: 14px;
    padding-inline: 16px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-topbar__actions {
    gap: 8px;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-global-search {
    min-width: 190px;
  }

  .crm-global-search {
    width: min(560px, 45vw);
  }

  body.crm-page-analytics .dashboard-wrapper {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.8fr);
  }
}

@media (max-width: 991.98px) {
  :root {
    --crm-sidebar-width: 0px;
    --crm-topbar-height: 0px;
  }

  body.crm-app {
    --crm-sidebar-width: 0px;
    padding-top: 0;
    padding-left: 0;
    padding-bottom: calc(
      var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom)
    );
  }

  body.crm-mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  html.crm-mobile-nav-hidden body.crm-app {
    --crm-mobile-nav-height: 0px;
    padding-bottom: 0;
  }

  html.crm-mobile-nav-hidden .crm-mobile-nav {
    display: none;
  }

  .crm-sidebar {
    display: none;
  }

  .crm-topbar {
    display: none;
  }

  body.crm-page-board > header,
  body.crm-page-analytics .control-panel {
    top: 0;
  }

  .crm-mobile-nav {
    position: fixed;
    right: auto;
    bottom: var(--crm-vv-bottom, 0px);
    left: var(--crm-vv-left, 0px);
    width: var(--crm-vv-width, 100%);
    z-index: var(--crm-z-mobile-nav);
    display: grid;
    height: calc(var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 8px max(6px, var(--crm-mobile-safe-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--crm-border);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
  }

  .crm-mobile-nav__link {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 4px 2px;
    color: var(--crm-nav-muted);
    background: transparent;
    border: 0;
    border-radius: var(--crm-radius-sm);
    font:
      400 11px/1.15 "CRM Chat Roboto", Roboto, Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
  }

  .crm-mobile-nav__link i {
    font-size: 20px;
    line-height: 1;
  }

  .crm-mobile-nav__link:hover,
  .crm-mobile-nav__link.is-active {
    color: var(--crm-nav-active);
    background: var(--crm-nav-selected);
  }

  .crm-mobile-more-backdrop {
    position: fixed;
    top: var(--crm-vv-top, 0px);
    left: var(--crm-vv-left, 0px);
    width: var(--crm-vv-width, 100%);
    height: var(--crm-vv-height, 100dvh);
    z-index: var(--crm-z-backdrop);
    display: block;
    opacity: 0;
    background: rgba(15, 23, 42, 0.38);
    pointer-events: none;
    transition: opacity 0.22s ease;
    backdrop-filter: blur(2px);
  }

  .crm-mobile-more-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .crm-mobile-more {
    position: fixed;
    right: auto;
    bottom: var(--crm-vv-bottom, 0px);
    left: var(--crm-vv-left, 0px);
    z-index: var(--crm-z-sheet);
    display: flex;
    width: var(--crm-vv-width, 100%);
    max-height: min(82dvh, calc(var(--crm-vv-height, 100dvh) - 16px), 720px);
    flex-direction: column;
    padding: 9px 16px max(18px, var(--crm-mobile-safe-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid var(--crm-border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: var(--crm-shadow-dialog);
    transform: translateY(102%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .crm-mobile-more.is-open {
    transform: translateY(0);
  }

  .crm-mobile-more__handle {
    width: 38px;
    height: 4px;
    flex: 0 0 auto;
    margin: 0 auto 13px;
    background: #c8d0dc;
    border-radius: 999px;
  }

  .crm-mobile-more__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
  }

  .crm-mobile-more__eyebrow {
    margin-bottom: 2px;
    color: var(--crm-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .crm-mobile-more__title {
    margin: 0;
    color: var(--crm-text-strong);
    font-size: 20px;
    font-weight: 720;
  }

  .crm-mobile-more__close {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--crm-muted);
    background: var(--crm-surface-subtle);
    border: 0;
    border-radius: var(--crm-radius-md);
    font-size: 18px;
  }

  .crm-mobile-more__create {
    min-height: 44px;
    flex: 0 0 auto;
    margin-bottom: 12px;
  }

  .crm-mobile-more__board-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
  }

  .crm-mobile-more__board-actions .crm-mobile-more__create {
    flex: 1 1 auto;
    margin-bottom: 0;
  }

  .crm-mobile-more__board-settings {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    color: var(--crm-text-strong);
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    font-size: 18px;
  }

  .crm-mobile-more__links {
    display: grid;
    min-height: 0;
    flex: 0 0 auto;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .crm-mobile-more__link {
    display: grid;
    min-height: 54px;
    grid-template-columns: 24px minmax(0, 1fr) 14px;
    gap: 9px;
    align-items: center;
    padding: 9px 11px;
    color: #475467;
    background: var(--crm-surface-subtle);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-md);
    font-size: 12px;
    font-weight: 620;
    text-decoration: none;
  }

  .crm-mobile-more__link > i:first-child {
    color: var(--crm-nav-icon);
    font-size: 20px;
  }

  .crm-mobile-more__link.is-active {
    color: var(--crm-nav-active);
    background: var(--crm-nav-selected);
    border-color: #d5d5d5;
  }

  .crm-mobile-more__link.is-active > i:first-child {
    color: var(--crm-nav-active);
  }

  .crm-mobile-more__chevron {
    color: var(--crm-muted-light);
    font-size: 12px;
  }

  .crm-mobile-more__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--crm-border);
  }

  .crm-mobile-more__footer .crm-logout-button {
    width: auto;
    min-height: 40px;
    padding-inline: 12px;
    color: var(--crm-danger);
    background: var(--crm-danger-soft);
  }

  body.crm-app .toast-container {
    top: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    left: 12px !important;
  }

  body.crm-app .toast {
    width: 100%;
    min-width: 0;
  }

  body.crm-app .call-audio-dock {
    right: 10px;
    bottom: calc(
      var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) + 10px
    );
    left: 10px;
  }

  body.crm-page-table #massActionPanel {
    left: 50% !important;
    bottom: calc(
      var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) + 10px
    ) !important;
  }

  body.crm-page-voice .voice-toast {
    top: calc(
      12px + var(--crm-app-toast-height, 0px) + var(--crm-app-toast-gap, 0px)
    );
    right: 12px;
    bottom: auto;
    left: 12px;
  }

  body.crm-page-table.crm-mass-actions-visible .call-audio-dock {
    bottom: calc(
      var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) +
        var(--crm-mass-panel-height, 0px) + 22px
    );
  }

  body.crm-page-analytics .dashboard-wrapper {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  body.crm-page-analytics .charts-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  body.crm-page-analytics .table-panel {
    min-height: 540px;
  }
}

@media (max-width: 767.98px) {
  body.crm-app .container,
  body.crm-app .container-fluid,
  body.crm-app .container-lg,
  body.crm-app .container-xl,
  body.crm-app .container-xxl {
    --bs-gutter-x: 1rem;
  }

  body.crm-app h1,
  body.crm-app .h1,
  body.crm-app .h3 {
    font-size: 23px;
  }

  body.crm-app .card {
    border-radius: var(--crm-radius-md);
  }

  body.crm-app .card-body {
    padding: 16px;
  }

  body.crm-app .card-header,
  body.crm-app .card-footer {
    padding: 13px 15px;
  }

  body.crm-app .btn:not(.btn-close) {
    min-height: 42px;
  }

  body.crm-app .btn-sm:not(.btn-close) {
    min-height: 36px;
  }

  body.crm-app .form-control,
  body.crm-app .form-select,
  body.crm-app .choices__inner {
    min-height: 44px;
    font-size: 14px;
  }

  body.crm-app .dropdown-menu {
    font-size: 14px;
  }

  body.crm-app .modal-dialog {
    display: flex;
    width: 100%;
    max-width: none;
    min-height: 100%;
    align-items: flex-end;
    margin: 0;
  }

  body.crm-app .modal-dialog-centered {
    min-height: 100%;
  }

  body.crm-app .modal-content {
    max-height: 92dvh;
    overflow: hidden;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  body.crm-app .modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.crm-app .modal-footer {
    padding-bottom: max(18px, var(--crm-mobile-safe-bottom));
  }

  body.crm-app #contactOffcanvas {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  body.crm-app #contactOffcanvas:not(.crm-contact-over-chat) {
    bottom: 0;
  }

  body.crm-page-board > header {
    padding: 10px 12px !important;
  }

  body.crm-page-board > main {
    padding: 14px 12px 30px !important;
  }

  body.crm-page-table > main {
    padding: 14px 12px 32px !important;
  }

  body.crm-page-table .filters-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px !important;
    align-items: stretch !important;
  }

  body.crm-page-table .filters-wrapper > div:first-child {
    width: 100% !important;
    max-width: none !important;
    grid-column: 1 / -1;
  }

  body.crm-page-table .filters-wrapper > div:nth-child(2),
  body.crm-page-table .filters-wrapper > div:nth-child(3) {
    width: 100% !important;
  }

  body.crm-page-table .filters-wrapper > .dropdown,
  body.crm-page-table .filters-wrapper > select,
  body.crm-page-table .filters-wrapper > button {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.crm-page-table .filter-control {
    width: 100% !important;
    min-height: 44px;
    justify-content: space-between;
  }

  body.crm-page-table
    .d-flex.flex-wrap.justify-content-between.align-items-center.mb-2.px-1 {
    gap: 10px;
    margin-top: 12px;
  }

  body.crm-page-table
    .d-flex.flex-wrap.justify-content-between.align-items-center.mb-2.px-1
    > .d-flex {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  body.crm-page-table #table-pagination-container {
    width: 100%;
    overflow-x: auto;
  }

  body.crm-page-table #contactsTable {
    border-radius: var(--crm-radius-sm);
  }

  body.crm-page-table #contactsTable .tabulator-row {
    min-height: 52px;
  }

  body.crm-page-table #massActionPanel {
    width: calc(100vw - 20px);
    max-width: 560px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px !important;
    border-radius: var(--crm-radius-lg) !important;
  }

  body.crm-page-table #massActionPanel .vr {
    display: none;
  }

  body.crm-page-analytics .control-panel {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 12px;
  }

  body.crm-page-analytics .filter-group {
    width: 100% !important;
    min-width: 0;
  }

  body.crm-page-analytics .dashboard-wrapper {
    gap: 12px;
    padding: 12px 12px 28px;
  }

  body.crm-page-analytics .table-panel {
    min-height: 500px;
  }

  body.crm-page-analytics .charts-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.crm-page-analytics .widget-card {
    min-height: 240px;
  }

  body.crm-page-finance .finance-page {
    padding: 16px 12px 34px;
  }

  body.crm-page-finance .finance-heading-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  body.crm-page-finance .finance-heading-actions [data-finance-add],
  body.crm-page-finance .finance-heading-actions .finance-btn-primary {
    grid-column: 1 / -1;
  }

  body.crm-page-documents .documents-admin,
  body.crm-page-document-companies .documents-admin {
    padding: 16px 12px 34px !important;
  }

  body.crm-page-documents .documents-admin > div:first-child,
  body.crm-page-document-companies .documents-admin > div:first-child {
    align-items: stretch !important;
  }

  body.crm-page-documents .documents-admin > div:first-child > .btn,
  body.crm-page-document-companies .documents-admin > div:first-child > .btn {
    width: 100%;
  }

  body.crm-page-documents #documents-form > .col-12.d-flex {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  body.crm-page-documents #documents-form > .col-12.d-flex .btn {
    width: 100%;
  }

  body.crm-page-history > main,
  body.crm-page-managers > .container,
  body.crm-page-settings > .container {
    padding: 16px 12px 34px !important;
  }

  body.crm-page-history .card-footer {
    gap: 12px;
    flex-wrap: wrap;
  }

  body.crm-page-history .card-footer .btn-group {
    width: 100%;
  }

  body.crm-page-history .card-footer .btn-group > * {
    flex: 1 1 0;
  }

  body.crm-page-managers table thead {
    display: none;
  }

  body.crm-page-managers table,
  body.crm-page-managers tbody,
  body.crm-page-managers tr,
  body.crm-page-managers td {
    display: block;
    width: 100%;
  }

  body.crm-page-managers tbody {
    display: grid;
    gap: 10px;
  }

  body.crm-page-managers tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    padding: 13px;
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-md);
  }

  body.crm-page-managers tbody td {
    padding: 0 !important;
    border: 0;
  }

  body.crm-page-managers tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    color: var(--crm-muted);
    font-size: 11px;
  }

  body.crm-page-managers tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-size: 15px;
  }

  body.crm-page-managers tbody td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }

  body.crm-page-managers tbody td:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 8px !important;
    border-top: 1px solid var(--crm-border);
  }

  body.crm-page-managers [id^="resetPass"] {
    position: static !important;
    width: 100%;
    margin-top: 0 !important;
  }

  body.crm-page-managers [id^="resetPass"] form {
    width: 100%;
  }

  body.crm-page-settings .table-responsive {
    overflow: visible;
  }

  body.crm-page-settings .table thead {
    display: none;
  }

  body.crm-page-settings .table,
  body.crm-page-settings .table tbody,
  body.crm-page-settings .table tr,
  body.crm-page-settings .table td {
    display: block;
    width: 100%;
  }

  body.crm-page-settings .table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  body.crm-page-settings .table tbody tr {
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-md);
  }

  body.crm-page-settings .table td[colspan="4"] {
    padding: 12px;
    border: 0;
  }

  body.crm-page-settings .table form.row,
  body.crm-page-settings .card-footer form.row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 9px !important;
    margin: 0;
  }

  body.crm-page-settings .table form.row > div,
  body.crm-page-settings .card-footer form.row > div {
    width: auto;
    padding: 0;
  }

  body.crm-page-settings .table form.row > div:nth-of-type(1),
  body.crm-page-settings .card-footer form.row > div:nth-of-type(1) {
    grid-column: 1;
  }

  body.crm-page-settings .table form.row > div:nth-of-type(2),
  body.crm-page-settings .card-footer form.row > div:nth-of-type(2) {
    grid-column: 2;
  }

  body.crm-page-settings .table form.row > div:nth-of-type(3),
  body.crm-page-settings .card-footer form.row > div:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  body.crm-page-settings .table form.row > div:nth-of-type(4),
  body.crm-page-settings .card-footer form.row > div:nth-of-type(4) {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  body.crm-page-voice .voice-shell {
    padding: 16px 12px 34px;
  }

  body.crm-page-voice .voice-title {
    font-size: 24px;
  }

  body.crm-page-voice .voice-summary {
    margin-right: -12px;
    margin-left: -12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

@media (max-width: 575.98px) {
  :root {
    --crm-mobile-nav-height: 68px;
  }

  .crm-mobile-more__links {
    grid-template-columns: 1fr;
  }

  .crm-mobile-more__link {
    min-height: 50px;
  }

  body.crm-app .modal-unified .px-4.pb-4 {
    grid-template-columns: 1fr;
  }

  body.crm-app .modal-unified .btn-primary {
    order: 1;
  }

  body.crm-app .modal-unified .btn-light {
    order: 2;
  }

  body.crm-page-board > header .row > [class*="col-"] {
    margin-bottom: 0 !important;
  }

  body.crm-page-board > header .row {
    row-gap: 8px;
  }

  body.crm-page-table .filters-wrapper {
    grid-template-columns: 1fr;
  }

  body.crm-page-table .filters-wrapper > div:first-child {
    grid-column: auto;
  }

  body.crm-page-table
    .d-flex.flex-wrap.justify-content-between.align-items-center.mb-2.px-1
    > .d-flex {
    grid-template-columns: 1fr;
  }

  body.crm-page-table #massActionPanel select,
  body.crm-page-table #massActionPanel button {
    width: 100% !important;
  }

  body.crm-page-finance .finance-heading-actions {
    grid-template-columns: 1fr;
  }

  body.crm-page-finance .finance-heading-actions [data-finance-add],
  body.crm-page-finance .finance-heading-actions .finance-btn-primary {
    grid-column: auto;
  }

  body.crm-auth {
    padding: 12px;
  }

  body.crm-auth .container {
    padding: 0;
  }

  body.crm-auth .card-header {
    padding: 22px 20px 16px !important;
  }

  body.crm-auth .card-body {
    padding: 20px !important;
  }

  body.crm-utility {
    padding: 14px !important;
  }
}

@media (max-width: 991.98px) and (max-height: 520px) and (orientation: landscape) {
  :root {
    --crm-mobile-nav-height: 56px;
  }

  .crm-mobile-nav {
    padding: 3px 8px max(3px, var(--crm-mobile-safe-bottom));
  }

  .crm-mobile-nav__link {
    min-height: 48px;
    gap: 2px;
    font-size: 9px;
  }

  .crm-mobile-nav__link i {
    font-size: 18px;
  }

  body.crm-page-table #massActionPanel {
    width: calc(100vw - 16px);
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 7px 8px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  body.crm-page-table #massActionPanel > span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body.crm-page-table #massActionPanel select,
  body.crm-page-table #massActionPanel button {
    width: auto !important;
    min-width: max-content;
    flex: 0 0 auto;
  }

  body.crm-app .call-audio-dock {
    grid-template-columns:
      minmax(90px, 0.8fr) 38px auto minmax(70px, 1fr) auto
      32px;
    gap: 6px;
    min-height: 56px;
    padding: 7px 9px;
  }

  body.crm-app .call-audio-dock__info,
  body.crm-app .call-audio-dock__toggle,
  body.crm-app #callAudioCurrent,
  body.crm-app .call-audio-dock__seek,
  body.crm-app #callAudioDuration,
  body.crm-app .call-audio-dock__close {
    grid-column: auto;
    grid-row: auto;
  }

  body.crm-app .call-audio-dock__toggle {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 991.98px) {
  .crm-contacts-view-switch {
    display: none;
  }

  body.crm-page-board {
    padding-bottom: 0;
  }

  body.crm-page-board:not(.crm-page-contact-search) > header.crm-contact-controls {
    position: fixed !important;
    top: auto !important;
    right: 0;
    bottom: calc(
      var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) + 8px
    );
    left: 0;
    z-index: 1039;
    height: 48px;
    padding: 0 8px !important;
    pointer-events: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    > header.crm-contact-controls
    > .container-fluid {
    display: block;
    height: 48px;
    pointer-events: none;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filters {
    --crm-mobile-filter-bg-start: #f7fbff;
    --crm-mobile-filter-bg-end: #edf5fd;
    --crm-mobile-filter-border: #d5e2f2;
    --crm-mobile-filter-text: #526174;
    --crm-mobile-filter-accent: #1473e6;
    --crm-mobile-filter-divider: rgba(82, 97, 116, 0.18);
    --crm-mobile-filter-active: #e1edfc;
    --crm-mobile-filter-shadow:
      0 8px 24px rgba(31, 72, 120, 0.16),
      0 2px 6px rgba(31, 72, 120, 0.08);
    position: relative;
    display: block;
    width: 100%;
    height: 48px;
    pointer-events: none;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters__pill {
    display: grid;
    width: min(288px, calc(100vw - 118px));
    height: 48px;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) 58px 58px;
    gap: 0;
    overflow: visible;
    isolation: isolate;
    pointer-events: auto;
    background: linear-gradient(
      180deg,
      var(--crm-mobile-filter-bg-start) 0%,
      var(--crm-mobile-filter-bg-end) 100%
    );
    border: 1px solid var(--crm-mobile-filter-border);
    border-radius: 24px;
    box-shadow: var(--crm-mobile-filter-shadow);
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filter {
    min-width: 0;
    height: 46px;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filter--stage {
    grid-column: 1;
    grid-row: 1;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filter--change {
    grid-column: 2;
    grid-row: 1;
  }

  .crm-contact-quick-filters #filterBtn,
  .crm-contact-quick-filters #stageBtn {
    min-width: 0;
    min-height: 46px;
    color: #071633;
    background: transparent;
    border: 0;
    border-radius: 22px;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 650;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #filterBtn,
  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #stageBtn {
    color: var(--crm-mobile-filter-text) !important;
    background: transparent !important;
    border-color: transparent !important;
    text-shadow: none;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #filterBtn {
    min-height: 46px;
    padding: 0;
    border-radius: 0;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #filterBtn
    > i {
    font-size: 21px;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #filterText {
    display: none;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #stageBtn {
    min-height: 46px;
    justify-content: flex-start !important;
    padding-inline: 14px 8px;
    border-radius: 22px 0 0 22px;
  }

  .crm-contact-quick-filters #stageBtn > span:not(.badge) {
    min-width: 0;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #filterBtn.is-active {
    color: var(--crm-mobile-filter-accent) !important;
    background: var(--crm-mobile-filter-active) !important;
    border-color: transparent !important;
    box-shadow: inset 0 0 0 1px rgba(20, 115, 230, 0.08) !important;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #stageBtn.is-active {
    color: var(--crm-stage-color, var(--crm-mobile-filter-accent)) !important;
    background: var(--crm-mobile-filter-active) !important;
    border-color: transparent !important;
    box-shadow: inset 0 0 0 1px rgba(20, 115, 230, 0.08) !important;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #filterBtn:is(.show, :active),
  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    #stageBtn:is(.show, :active) {
    color: var(--crm-mobile-filter-accent) !important;
    background: var(--crm-mobile-filter-active) !important;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    .crm-contact-filter-dot {
    top: 2px;
    right: 2px;
    display: grid;
    min-width: 16px;
    width: auto;
    height: 16px;
    padding: 0 4px;
    place-items: center;
    color: #fff;
    background: var(--crm-mobile-filter-accent);
    border: 1.5px solid #fff;
    font-size: 9px;
    font-weight: 750;
    line-height: 1;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    .crm-contact-filter-dot:not(.has-initial) {
    min-width: 9px;
    width: 9px;
    height: 9px;
    padding: 0;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    .crm-contact-filter-dot[hidden] {
    display: none;
  }

  body.crm-page-board:not(.crm-page-contact-search) #stageCount {
    min-width: 0;
    padding: 4px 7px;
    color: #405169;
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(213, 226, 242, 0.9);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 650;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-stage-dot {
    position: static;
    display: inline-block;
    width: 7px;
    min-width: 7px !important;
    height: 7px;
    flex: 0 0 7px;
    border: 0;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.95),
      0 0 0 3px rgba(82, 97, 116, 0.12);
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-stage-dot[hidden] {
    display: none;
  }

  body.crm-page-board:not(.crm-page-contact-search) #stageBtn {
    --crm-stage-color: #69737d;
    --crm-stage-soft: #f0f2f3;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn:is([data-stage-tone="primary"], [data-stage-tone="info"]) {
    --crm-stage-color: #1769e0;
    --crm-stage-soft: #edf4ff;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="success"] {
    --crm-stage-color: #16a34a;
    --crm-stage-soft: #eaf8ef;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="warning"] {
    --crm-stage-color: #b7790b;
    --crm-stage-soft: #fff7e6;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="danger"] {
    --crm-stage-color: #c2414f;
    --crm-stage-soft: #fff0f2;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="calm-blue"] {
    --crm-stage-color: #5279a3;
    --crm-stage-soft: #edf2f7;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="muted-amber"] {
    --crm-stage-color: #a97843;
    --crm-stage-soft: #f8f2ec;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="soft-green"] {
    --crm-stage-color: #578064;
    --crm-stage-soft: #eef4f0;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="gray-teal"] {
    --crm-stage-color: #4f7d78;
    --crm-stage-soft: #edf4f3;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="muted-terracotta"] {
    --crm-stage-color: #a36859;
    --crm-stage-soft: #f8f0ee;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="warm-gray"] {
    --crm-stage-color: #827579;
    --crm-stage-soft: #f4f1f2;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    #stageBtn[data-stage-tone="gray-violet"] {
    --crm-stage-color: #6f7194;
    --crm-stage-soft: #f1f1f6;
  }

  body.crm-page-board:not(.crm-page-contact-search) .crm-contact-quick-filters .dropdown-menu {
    max-width: calc(100vw - 16px);
    max-height: min(58dvh, 420px);
    overflow-y: auto;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filter--change
    > .dropdown-menu {
    min-width: min(260px, calc(100vw - 16px));
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filter--stage
    > .dropdown-menu {
    min-width: min(220px, calc(100vw - 16px));
  }

  .crm-mobile-contact-filter-status__open {
    position: relative;
    display: inline-flex;
    width: 58px;
    min-width: 58px;
    min-height: 46px;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--crm-mobile-filter-text);
    background: transparent !important;
    border: 0;
    border-radius: 0 22px 22px 0;
    font-size: 21px;
  }

  .crm-mobile-contact-filter-status__open.is-active {
    color: var(--crm-mobile-filter-accent) !important;
    background: var(--crm-mobile-filter-active) !important;
    border-color: transparent !important;
    box-shadow: inset 0 0 0 1px rgba(20, 115, 230, 0.08) !important;
  }

  .crm-mobile-contact-filter-status__open:active {
    color: var(--crm-mobile-filter-accent) !important;
    background: var(--crm-mobile-filter-active) !important;
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filter--change::before,
  body.crm-page-board:not(.crm-page-contact-search)
    .crm-mobile-contact-filter-status__open::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 1px;
    background: var(--crm-mobile-filter-divider);
    pointer-events: none;
  }

  .crm-mobile-contact-filter-status__count {
    position: absolute;
    top: 2px;
    right: 2px;
    display: grid;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    place-items: center;
    color: #fff;
    background: var(--crm-mobile-filter-accent);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    border: 1.5px solid #fff;
  }

  .crm-mobile-contact-filter-status__count[hidden] {
    display: none;
  }

  .crm-mobile-contact-filter-status__clear {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    display: grid;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    color: var(--crm-mobile-filter-accent);
    background: linear-gradient(
      180deg,
      var(--crm-mobile-filter-bg-start) 0%,
      var(--crm-mobile-filter-bg-end) 100%
    );
    border: 1px solid var(--crm-mobile-filter-border);
    border-radius: 50%;
    box-shadow: var(--crm-mobile-filter-shadow);
    font-size: 21px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-7px) scale(0.96);
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 0s linear 180ms;
  }

  .crm-mobile-contact-filter-status__clear.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) scale(1);
    transition-delay: 0s;
  }

  .crm-mobile-contact-filter-status__clear:hover,
  .crm-mobile-contact-filter-status__clear:active {
    color: #0d63c7;
    background: var(--crm-mobile-filter-active);
  }

  body.crm-page-board:not(.crm-page-contact-search)
    .crm-contact-quick-filters
    :is(
      #stageBtn,
      #filterBtn,
      .crm-mobile-contact-filter-status__open,
      .crm-mobile-contact-filter-status__clear
    ):focus-visible {
    outline: 0 !important;
    box-shadow: inset 0 0 0 2px rgba(20, 115, 230, 0.16) !important;
  }

  body.crm-page-board:not(.crm-page-contact-search) > main {
    padding-bottom: calc(
      var(--crm-mobile-contacts-tools-height, 96px) +
        var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) + 22px
    ) !important;
  }

  body.crm-page-board:not(.crm-page-contact-search) .call-audio-dock {
    bottom: calc(
      var(--crm-mobile-contacts-tools-height, 96px) +
        var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) + 10px
    );
  }

  body.crm-page-board .crm-contact-advanced-filters.offcanvas {
    height: auto;
    max-height: min(90dvh, 780px);
    padding: 8px 14px max(14px, var(--crm-mobile-safe-bottom));
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--crm-border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
  }

  .crm-contact-advanced-filters__handle {
    width: 38px;
    height: 4px;
    flex: 0 0 auto;
    margin: 0 auto 12px;
    background: #c8d0dc;
    border-radius: 999px;
  }

  .crm-contact-advanced-filters__header {
    flex: 0 0 auto;
    padding: 0 2px 13px;
    border-bottom: 1px solid var(--crm-border);
  }

  .crm-contact-advanced-filters__header .btn-close {
    width: 44px;
    height: 44px;
    margin: -8px -8px -8px 0;
    padding: 0;
    background-position: center;
    background-size: 14px;
    box-shadow: none !important;
  }

  .crm-contact-advanced-filters__body {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 15px 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .crm-contact-filter-field--period,
  .crm-contact-filter-field--managers,
  .crm-contact-filter-field--duration,
  .crm-contact-filter-field--sort {
    width: 100%;
    max-width: none;
  }

  .crm-contact-filter-field legend,
  .crm-contact-filter-field__label {
    margin-bottom: 6px;
    color: #475467;
    font-size: 12px;
    font-weight: 650;
  }

  .crm-contact-filter-field .form-control,
  .crm-contact-filter-field .form-select {
    min-height: 46px;
    color: #475569;
    background-color: #fff;
    border-color: #c5cfdd;
    border-radius: 8px;
    box-shadow: none !important;
    font-size: 14px;
  }

  .crm-contact-date-range-control {
    height: 46px;
    border-color: #c5cfdd;
    border-radius: 8px;
  }

  .crm-contact-date-range-control .form-control {
    min-height: 44px;
    font-size: 15px;
  }

  .crm-contact-date-range-control .clear-btn {
    width: 44px;
    height: 44px;
  }

  .crm-contact-filter-field--managers .crm-contact-compact-dropdown > .filter-control,
  .crm-contact-filter-field--duration .crm-contact-compact-dropdown > .filter-control {
    display: flex;
    min-height: 46px;
    color: #64748b;
    background: #fff;
    border-color: #c5cfdd;
    border-radius: 8px;
    font-size: 15px;
  }

  .crm-contact-filter-field--managers .crm-contact-filter-menu,
  .crm-contact-filter-field--duration .crm-contact-filter-menu {
    position: static !important;
    inset: auto !important;
    display: none !important;
    width: 100%;
    max-width: none;
    margin-top: 8px !important;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d8e0ec;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09) !important;
    transform: none !important;
  }

  .crm-contact-filter-field--managers .crm-contact-filter-menu.show,
  .crm-contact-filter-field--duration .crm-contact-filter-menu.show {
    display: block !important;
  }

  .crm-contact-manager-filter .crm-contact-manager-options {
    min-height: 0;
    max-height: 240px;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    overflow-y: auto;
    background: #fff;
    border: 0;
    border-radius: 0;
  }

  .crm-contact-manager-options {
    min-height: 0;
    overflow-y: auto;
  }

  .crm-contact-manager-option {
    flex: 0 0 auto;
  }

  .crm-contact-manager-filter .crm-contact-manager-option {
    width: 100%;
    min-height: 44px;
    flex: 0 0 auto;
  }

  .crm-contact-manager-filter .crm-contact-manager-option .form-check-input {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 16px;
    height: 16px;
    margin: -8px 0 0;
    opacity: 1;
    pointer-events: auto;
  }

  .crm-contact-manager-option span {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
  }

  .crm-contact-manager-filter .crm-contact-manager-option span {
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 10px 0 34px;
    color: #334155;
    background: #fff;
    border: 0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
  }

  .crm-contact-manager-filter .crm-contact-manager-option .form-check-input:checked + span {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: transparent;
  }

  .crm-contact-duration-filter .crm-contact-filter-duration {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
  }

  .crm-contact-duration-filter .crm-contact-filter-duration label > span,
  .crm-contact-duration-filter .input-group-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .crm-contact-duration-filter .input-group .form-control {
    min-height: 46px;
    border-radius: 8px 0 0 8px !important;
    font-size: 14px;
  }

  .crm-contact-duration-filter .input-group-text {
    padding-inline: 8px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
  }

  .crm-contact-filter-menu__reset {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: flex-end;
    margin: -10px -4px -10px 0;
    padding: 0 4px;
  }

  .crm-contact-advanced-filters__actions {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 2px 0;
    background: #fff;
    border-top: 1px solid var(--crm-border);
  }

  .crm-contact-advanced-filters__actions .btn {
    min-height: 48px;
  }

  .crm-contact-advanced-filters__actions [data-open-new-contact-from-filters] {
    grid-column: auto;
  }

  body.crm-page-contact-search > header.crm-contact-controls {
    position: sticky !important;
    top: 0 !important;
    bottom: auto !important;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px !important;
    background: #fff !important;
  }

  body.crm-page-contact-search > header.crm-contact-controls > .container-fluid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .crm-contact-search-entry {
    display: grid;
    width: 100%;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .crm-contact-search-entry__back {
    display: grid;
    width: 40px;
    height: 48px;
    place-items: center;
    color: #475467;
    background: #fff;
    border: 1px solid var(--crm-border-strong);
    border-radius: var(--crm-radius-sm);
    font-size: 18px;
    text-decoration: none;
  }

  .crm-contact-search-entry .input-group {
    border: 1px solid var(--crm-border-strong);
  }

  .crm-contact-search-entry .input-group:focus-within {
    border-color: #aeb9c8;
    box-shadow: 0 0 0 1px rgba(71, 84, 103, 0.08);
  }

  .crm-contact-search-entry .input-group > * {
    min-height: 48px !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
  }

  .crm-contact-search-entry .input-group > *:first-child {
    border-left: 0 !important;
  }

  .crm-contact-search-entry .input-group > *:last-child {
    border-right: 0 !important;
  }

  .crm-contact-search-entry input {
    min-width: 0;
    font-size: 16px !important;
    box-shadow: none !important;
  }

  body.crm-page-contact-search .crm-contact-quick-filters {
    display: block;
    width: 100%;
  }

  body.crm-page-contact-search .crm-contact-quick-filters__pill {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  body.crm-page-contact-search .crm-contact-quick-filter {
    min-width: 0;
  }

  body.crm-page-contact-search .crm-contact-quick-filter--change {
    order: 1;
  }

  body.crm-page-contact-search .crm-contact-quick-filter--stage {
    order: 2;
  }

  body.crm-page-contact-search .crm-contact-search-clear-all {
    width: 100%;
    min-height: 40px;
    margin-top: 8px;
    font-size: 12px;
  }

  body.crm-page-contact-search .crm-contact-search-clear-all[hidden] {
    display: none;
  }

  body.crm-page-contact-search > main {
    padding-top: 14px !important;
    padding-bottom: calc(
      var(--crm-mobile-nav-height) + var(--crm-mobile-safe-bottom) + 24px
    ) !important;
  }

  .crm-mobile-nav {
    transition: transform 0.18s ease;
  }

  body.crm-page-contact-search.crm-mobile-keyboard-open .crm-mobile-nav {
    transform: translateY(110%);
    pointer-events: none;
  }

  body.crm-contact-filters-open .call-audio-dock {
    z-index: 1038 !important;
    pointer-events: none !important;
  }
}

.sms-composer .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.22);
}

.sms-composer .modal-header,
.sms-composer .modal-footer {
  padding: 16px 20px;
  border-color: #eaecf0;
}

.sms-composer .modal-body {
  display: grid;
  gap: 15px;
  padding: 20px;
}

.sms-composer__eyebrow {
  margin-bottom: 2px;
  color: #1570ef;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sms-composer__status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
}

.sms-composer__status.is-loading { color: #175cd3; background: #eff8ff; }
.sms-composer__status.is-ok { color: #067647; background: #ecfdf3; }
.sms-composer__status.is-error { color: #b42318; background: #fef3f2; }
.sms-composer__status.is-loading i { animation: sms-composer-spin 0.8s linear infinite; }

@keyframes sms-composer-spin { to { transform: rotate(360deg); } }

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

.sms-composer__field {
  display: grid;
  gap: 6px;
}

.sms-composer__field > span {
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.sms-composer__field textarea {
  min-height: 132px;
  resize: vertical;
}

.sms-composer__meta,
.sms-composer__result {
  font-size: 12px;
}

.sms-composer__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #667085;
}

.sms-composer__meta .is-error { color: #b42318; font-weight: 700; }

.sms-composer__result {
  padding: 11px 12px;
  border-radius: 10px;
  white-space: pre-line;
}

.sms-composer__result.is-success { color: #067647; background: #ecfdf3; }
.sms-composer__result.is-error { color: #b42318; background: #fef3f2; }
.sms-composer__submit { display: inline-flex; align-items: center; gap: 7px; }

@media (max-width: 575.98px) {
  .sms-composer .modal-dialog {
    min-height: 100%;
    margin: 0;
    align-items: flex-end;
  }

  .sms-composer .modal-content {
    max-height: calc(100dvh - 18px);
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
  }

  .sms-composer__grid { grid-template-columns: 1fr; }
  .sms-composer__meta { flex-direction: column; gap: 3px; }
  .sms-composer .modal-footer .btn { min-height: 43px; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .crm-nav-create,
  .crm-nav-link,
  .crm-sidebar,
  .crm-topbar,
  .crm-mobile-more,
  .crm-mobile-more-backdrop,
  .crm-mobile-contact-filter-status__clear {
    transition: none !important;
  }
  .sms-composer__status.is-loading i { animation: none; }
}

@media print {
  .crm-app-nav,
  .crm-sidebar,
  .crm-topbar,
  .crm-mobile-nav,
  .crm-mobile-more,
  .crm-mobile-more-backdrop,
  body.crm-app .toast-container,
  body.crm-app .call-audio-dock {
    display: none !important;
  }

  body.crm-app {
    padding: 0 !important;
    background: #fff !important;
  }
}

/* Reversible CRM changes stay below the workspace and above its controls. */
.crm-undo-region {
  position: fixed;
  right: var(--crm-undo-right, 16px);
  bottom: var(--crm-undo-bottom, 16px);
  z-index: 2300;
  display: grid;
  width: max-content;
  max-width: var(--crm-undo-width, min(420px, calc(100vw - 24px)));
  max-height: var(--crm-undo-max-height, min(220px, 30dvh));
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
  scrollbar-width: thin;
}
.crm-undo-region:empty { display: none; }
.crm-undo-notice {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
  min-height: 40px;
  padding: 0;
  color: #25364c;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}
.crm-undo-notice__label {
  min-width: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  background: #fff;
  border-radius: 7px;
  pointer-events: auto;
}
.crm-undo-notice.is-error .crm-undo-notice__label { color: #a1251b; }
.crm-undo-notice__action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: #146248;
  background: #edf7f1;
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 120ms ease, transform 120ms ease;
}
.crm-undo-notice__action:hover { background: #dfeee5; }
.crm-undo-notice__action:active { transform: scale(.97); }
.crm-undo-notice__action:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.crm-undo-notice__action:disabled { color: #667085; background: #f2f4f7; cursor: wait; }
.crm-undo-notice__action span { display: inline-block; min-width: 20px; font-variant-numeric: tabular-nums; }
#contactOffcanvas .msg-timeline { padding-bottom: calc(18px + var(--crm-undo-card-clearance, 0px)); }
.comment-edit-sheet__body, .next-action-editor__body { padding-bottom: var(--crm-undo-editor-clearance, 0px); }
body.crm-app .crm-app-toast-region {
  top: auto !important;
  right: var(--crm-toast-right, 16px) !important;
  bottom: var(--crm-toast-bottom, 16px) !important;
  left: auto !important;
  z-index: 2300 !important;
  width: var(--crm-toast-width, min(420px, calc(100vw - 24px)));
  padding: 0 !important;
}
body.crm-app .crm-app-toast-region .toast { width: 100%; min-width: 0; }
@media (prefers-reduced-motion: reduce) {
  .crm-undo-notice__action { transition: none; }
  .crm-undo-notice__action:active { transform: none; }
}
@media print {
  .crm-undo-region, body.crm-app .crm-app-toast-region { display: none !important; }
}
