/* ================================================================
   CRM Public Sidebar
   Collapsed = icon rail (84px), expands on hover / pin (236px).
   ================================================================ */

/* --- Layout shell --- */
.crm-public-layout {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
}

.crm-public-main {
  flex: 1;
  min-width: 0;
}

/* --- Mobile shell (enabled below 768px) --- */
.crm-mobile-header,
.crm-sidebar-backdrop,
.crm-sidebar__mobile-close {
  display: none;
}

.crm-sidebar-backdrop[hidden] {
  display: none !important;
}

.crm-mobile-header {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1040;
  align-items: center;
  gap: 10px;
  padding: env(safe-area-inset-top, 0px) 12px 0;
  border-bottom: 1px solid rgba(167, 139, 250, .22);
  background:
    radial-gradient(circle at 35% 0%, rgba(124, 58, 237, .22), transparent 55%),
    linear-gradient(180deg, #1c1336, #130d24);
  color: rgba(255, 255, 255, .92);
  box-shadow: 0 5px 22px rgba(8, 5, 22, .24);
}

.crm-mobile-menu-btn,
.crm-sidebar__mobile-close {
  appearance: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
}

.crm-mobile-menu-btn {
  display: inline-flex;
}

.crm-mobile-menu-btn:hover,
.crm-mobile-menu-btn:focus-visible,
.crm-sidebar__mobile-close:hover,
.crm-sidebar__mobile-close:focus-visible {
  border-color: rgba(196, 181, 253, .45);
  background: rgba(124, 58, 237, .24);
  outline: 2px solid rgba(196, 181, 253, .85);
  outline-offset: 2px;
}

.crm-mobile-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.crm-mobile-brand:hover {
  color: #fff;
}

.crm-mobile-brand img {
  display: block;
  width: 34px;
  height: 34px;
}

.crm-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1045;
  background: rgba(8, 5, 22, .58);
  backdrop-filter: blur(2px);
}

/* --- Sidebar root --- */
.crm-sidebar {
  --sb-w: 84px;
  --sb-w-open: 236px;
  --sb-bg0: #130d24;
  --sb-bg1: #1c1336;
  --sb-border: rgba(124, 58, 237, .24);
  --sb-text: rgba(255, 255, 255, .92);
  --sb-muted: rgba(255, 255, 255, .52);

  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  height: 100dvh;
  align-self: flex-start;
  flex-shrink: 0;
  width: var(--sb-w);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, .22), transparent 40%),
    linear-gradient(180deg, var(--sb-bg1), var(--sb-bg0));
  border-right: 1px solid var(--sb-border);
  box-shadow: 6px 0 28px rgba(8, 5, 22, .22);
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: width .28s cubic-bezier(.4, 0, .2, 1),
              box-shadow .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .7) 45%, rgba(56, 189, 248, .6));
}

.crm-sidebar:hover,
.crm-sidebar:focus-within,
.crm-sidebar--pinned {
  width: var(--sb-w-open);
  box-shadow: 14px 0 38px rgba(8, 5, 22, .28);
}

/*
 * Свёрнутый режим: строки внутри .crm-sidebar__inner шириной --sb-w-open, видно только 84px слева.
 * Без ограничения ширины строк центрирование и «14px слева» выглядят как сдвиг влево.
 * Ограничиваем ширину ряда до --sb-w и центрируем плитки в этой полосе.
 */
.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__brand {
  box-sizing: border-box;
  width: var(--sb-w);
  max-width: var(--sb-w);
  padding: 16px 0 12px;
  justify-content: center;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__list > li:not(.crm-sidebar__group-label):not(.crm-sidebar__sep) {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: var(--sb-w);
  max-width: var(--sb-w);
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__link {
  margin-left: 0;
  margin-right: 0;
  gap: 0;
  padding: 8px;
  justify-content: center;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__sep {
  width: calc(var(--sb-w) - 24px);
  max-width: calc(var(--sb-w) - 24px);
  margin-left: auto;
  margin-right: auto;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__footer {
  box-sizing: border-box;
  width: var(--sb-w);
  max-width: var(--sb-w);
  padding: 12px 0;
  gap: 0;
  align-items: center;
  overflow: hidden;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__user {
  justify-content: center;
  width: 100%;
  gap: 0;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__user-text {
  position: absolute;
  left: 100%;
  pointer-events: none;
}

/* Переключатель темы только в развёрнутом / закреплённом сайдбаре */
.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__user-row .crm-theme-widget {
  display: none;
}

.crm-sidebar:hover .crm-sidebar__list > li:not(.crm-sidebar__group-label):not(.crm-sidebar__sep),
.crm-sidebar:focus-within .crm-sidebar__list > li:not(.crm-sidebar__group-label):not(.crm-sidebar__sep),
.crm-sidebar--pinned .crm-sidebar__list > li:not(.crm-sidebar__group-label):not(.crm-sidebar__sep) {
  display: block;
  width: auto;
  max-width: none;
  justify-content: unset;
}

.crm-sidebar:hover .crm-sidebar__sep,
.crm-sidebar:focus-within .crm-sidebar__sep,
.crm-sidebar--pinned .crm-sidebar__sep {
  width: auto;
  max-width: none;
  margin: 6px 20px 2px;
}

/* Inner always renders at full width; overflow clips in collapsed state */
.crm-sidebar__inner {
  display: flex;
  flex-direction: column;
  width: var(--sb-w-open);
  height: 100%;
  min-height: 0;
}

/* --- SVG icon base --- */
.crm-sidebar__svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Nav items use filled glyphs (currentColor), not stroke outlines */
.crm-sidebar__icon .crm-sidebar__svg {
  fill: currentColor;
  stroke: none;
  stroke-width: 0;
}

/* --- Brand / logo --- */
.crm-sidebar__brand {
  display: flex;
  align-items: center;
  padding: 16px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.crm-sidebar__brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 56px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .05);
  background: rgba(255, 255, 255, .03);
  text-decoration: none;
  color: var(--sb-text);
  transition: background .2s, border-color .2s, width .28s cubic-bezier(.4, 0, .2, 1),
              padding .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar__brand-link:hover {
  background: rgba(124, 58, 237, .15);
  border-color: rgba(167, 139, 250, .2);
}

.crm-sidebar:hover .crm-sidebar__brand,
.crm-sidebar:focus-within .crm-sidebar__brand,
.crm-sidebar--pinned .crm-sidebar__brand {
  width: auto;
  max-width: none;
  padding: 16px 14px 12px;
  justify-content: flex-start;
}

.crm-sidebar:hover .crm-sidebar__brand-link,
.crm-sidebar:focus-within .crm-sidebar__brand-link,
.crm-sidebar--pinned .crm-sidebar__brand-link {
  width: 100%;
  padding: 8px 12px;
}

.crm-sidebar__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.crm-sidebar__brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.crm-sidebar__brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity .22s, max-width .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar:hover .crm-sidebar__brand-copy,
.crm-sidebar:focus-within .crm-sidebar__brand-copy,
.crm-sidebar--pinned .crm-sidebar__brand-copy {
  opacity: 1;
  max-width: 180px;
}

.crm-sidebar__brand-text {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-sidebar__brand-sub {
  color: var(--sb-muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Nav area --- */
.crm-sidebar__nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, .35) transparent;
}

.crm-sidebar__nav::-webkit-scrollbar { width: 5px; }
.crm-sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, .35);
  border-radius: 999px;
}

.crm-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Group labels (only visible when expanded) */
.crm-sidebar__group-label {
  padding: 0;
  margin: 0 0 0 26px;
  color: rgba(255, 255, 255, .42);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .22s, max-height .28s, margin .28s;
}

.crm-sidebar:hover .crm-sidebar__group-label,
.crm-sidebar:focus-within .crm-sidebar__group-label,
.crm-sidebar--pinned .crm-sidebar__group-label {
  opacity: 1;
  max-height: 22px;
  margin: 4px 0 2px 26px;
}

.crm-sidebar__sep {
  height: 1px;
  margin: 6px 20px 2px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .28) 50%, transparent);
  list-style: none;
}

/* --- Nav link --- */
.crm-sidebar__link {
  --accent: #a78bfa;
  --accent-r: 167, 139, 250;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  /* <button> по умолчанию text-align: center — подпись «уплывает» в середину flex-ячейки */
  text-align: start;
  width: auto;
  min-width: 0;
  min-height: 56px;
  margin: 0 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-family: Manrope, system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: background .2s, border-color .2s, color .2s,
              width .28s cubic-bezier(.4, 0, .2, 1),
              margin .28s cubic-bezier(.4, 0, .2, 1),
              padding .28s cubic-bezier(.4, 0, .2, 1),
              gap .2s ease,
              box-shadow .2s, transform .15s;
}

/* Active indicator bar (left edge) */
.crm-sidebar__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(.3);
  transition: opacity .2s, transform .2s;
}

/* Развёрнуто: строка на всю ширину, отступ между иконкой и текстом */
.crm-sidebar:hover .crm-sidebar__link,
.crm-sidebar:focus-within .crm-sidebar__link,
.crm-sidebar--pinned .crm-sidebar__link {
  width: calc(100% - 20px);
  margin: 0 10px;
  padding: 8px 14px;
  gap: 12px;
  justify-content: flex-start;
}

.crm-sidebar__link:hover {
  background: linear-gradient(135deg, rgba(var(--accent-r), .16), rgba(255, 255, 255, .04));
  border-color: rgba(var(--accent-r), .22);
  color: #fff;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__link:hover {
  transform: scale(1.06);
}

.crm-sidebar__link:hover::before,
.crm-sidebar__link--active::before {
  opacity: 1;
  transform: scaleY(1);
}

.crm-sidebar__link--active {
  background: linear-gradient(135deg, rgba(var(--accent-r), .24), rgba(255, 255, 255, .06));
  border-color: rgba(var(--accent-r), .32);
  color: #fff;
  box-shadow: 0 0 24px rgba(var(--accent-r), .12);
}

.crm-sidebar__link--disabled {
  opacity: .38;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Icon box --- */
.crm-sidebar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-r), .3);
  background: linear-gradient(145deg, rgba(var(--accent-r), .32), rgba(var(--accent-r), .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1),
              0 6px 16px rgba(0, 0, 0, .18);
  color: var(--accent);
  transition: transform .2s, background .2s, border-color .2s, color .2s, box-shadow .2s;
}

.crm-sidebar__link:hover .crm-sidebar__icon,
.crm-sidebar__link--active .crm-sidebar__icon {
  border-color: rgba(var(--accent-r), .45);
  background: linear-gradient(145deg, rgba(var(--accent-r), .44), rgba(var(--accent-r), .16));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12),
              0 8px 20px rgba(var(--accent-r), .18);
}

/* Подпись: в свёрнутом меню вне потока — иконка не смещается при смене ширины сайдбара */
.crm-sidebar__label {
  min-width: 0;
  flex: 1 1 auto;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-sidebar:not(:hover):not(:focus-within):not(.crm-sidebar--pinned) .crm-sidebar__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  flex: 0 0 0;
  pointer-events: none;
}

.crm-sidebar:hover .crm-sidebar__label,
.crm-sidebar:focus-within .crm-sidebar__label,
.crm-sidebar--pinned .crm-sidebar__label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  clip-path: none;
  overflow: hidden;
  opacity: .92;
  flex: 1 1 auto;
  max-width: 160px;
  transition: opacity .2s ease;
}

/* --- Per-section accent colours --- */
.crm-sidebar__link--pipelines  { --accent: #60a5fa; --accent-r: 96, 165, 250; }
.crm-sidebar__link--automation { --accent: #fbbf24; --accent-r: 251, 191, 36; }
.crm-sidebar__link--messenger  { --accent: #22d3ee; --accent-r: 34, 211, 238; }
.crm-sidebar__link--bots       { --accent: #38bdf8; --accent-r: 56, 189, 248; }
.crm-sidebar__link--management { --accent: #f472b6; --accent-r: 244, 114, 182; }
.crm-sidebar__link--tracker    { --accent: #34d399; --accent-r: 52, 211, 153; }

/* --- Footer --- */
.crm-sidebar__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0 12px 14px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(10, 8, 20, .08), rgba(255, 255, 255, .02));
  transform: translateZ(0);
  contain: layout;
  transition: padding .28s cubic-bezier(.4, 0, .2, 1),
              gap .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar:hover .crm-sidebar__footer,
.crm-sidebar:focus-within .crm-sidebar__footer,
.crm-sidebar--pinned .crm-sidebar__footer {
  width: auto;
  max-width: none;
  padding: 12px 14px;
  align-items: flex-start;
}

.crm-sidebar:hover .crm-sidebar__user,
.crm-sidebar:focus-within .crm-sidebar__user,
.crm-sidebar--pinned .crm-sidebar__user {
  justify-content: flex-start;
}

/* User + theme (one row, theme icon on the right) */
.crm-sidebar__user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.crm-sidebar__user-row .crm-sidebar__user {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.crm-sidebar__user-row .crm-theme-widget {
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
}

.crm-sidebar .crm-sidebar__theme-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.crm-sidebar .crm-sidebar__theme-btn .crm-theme-fab__icon {
  width: 20px;
  height: 20px;
}

/* User block */
.crm-sidebar__user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transform: translateZ(0);
  transition: justify-content .28s cubic-bezier(.4, 0, .2, 1),
              gap .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar__user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(221, 214, 254, .88));
  box-shadow: 0 6px 16px rgba(10, 6, 24, .18);
  color: #5b21b6;
  transform: translateZ(0);
}

.crm-sidebar__user-avatar .crm-sidebar__svg {
  width: 20px;
  height: 20px;
}

.crm-sidebar__user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  max-width: 0;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: opacity .18s cubic-bezier(.4, 0, .2, 1) .1s,
              max-width .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar:hover .crm-sidebar__user-text,
.crm-sidebar:focus-within .crm-sidebar__user-text,
.crm-sidebar--pinned .crm-sidebar__user-text {
  position: static;
  opacity: 1;
  max-width: 160px;
  pointer-events: auto;
  transition-delay: 0s, 0s;
}

.crm-sidebar__user-name {
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-sidebar__user-email {
  color: var(--sb-muted);
  font-size: .68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions row (toggle + logout) */
.crm-sidebar__actions {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: stretch;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: opacity .18s cubic-bezier(.4, 0, .2, 1) .1s,
              max-height .28s cubic-bezier(.4, 0, .2, 1);
}

.crm-sidebar__actions > * {
  flex: 1 1 0;
  min-width: 0;
}

.crm-sidebar:hover .crm-sidebar__actions,
.crm-sidebar:focus-within .crm-sidebar__actions,
.crm-sidebar--pinned .crm-sidebar__actions {
  opacity: 1;
  max-height: 50px;
  transition-delay: 0s, 0s;
}

.crm-sidebar__logout-form {
  margin: 0;
  display: flex;
  min-width: 0;
}

.crm-sidebar__logout-form .crm-sidebar__action-btn {
  flex: 1;
  min-width: 0;
}

.crm-sidebar__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .7);
  font-family: Manrope, system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transform: translateZ(0);
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}

.crm-sidebar__action-btn .crm-sidebar__svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.crm-sidebar__action-btn:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
  color: #fff;
}

.crm-sidebar__logout:hover {
  background: rgba(239, 68, 68, .14);
  border-color: rgba(248, 113, 113, .24);
  color: #fca5a5;
}

/* Pin active state */
.crm-sidebar--pinned .crm-sidebar__toggle {
  background: rgba(124, 58, 237, .2);
  border-color: rgba(167, 139, 250, .3);
  color: #c4b5fd;
}

.crm-sidebar--pinned .crm-sidebar__toggle .crm-sidebar__svg {
  transform: rotate(45deg);
  transition: transform .2s;
}

/* Action labels hidden when collapsed (but the whole row is hidden anyway) */
.crm-sidebar__action-text {
  white-space: nowrap;
}

/* --- Feedback button specific styles --- */
.crm-sidebar__link--feedback {
  --accent: #22d3ee;
  --accent-r: 34, 211, 238;
}

.crm-sidebar__link--feedback:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(255, 255, 255, .04));
  border-color: rgba(34, 211, 238, .22);
}

.crm-sidebar__link--feedback .crm-sidebar__icon {
  border-color: rgba(34, 211, 238, .3);
  background: linear-gradient(145deg, rgba(34, 211, 238, .32), rgba(34, 211, 238, .1));
}

.crm-sidebar__link--feedback:hover .crm-sidebar__icon {
  border-color: rgba(34, 211, 238, .45);
  background: linear-gradient(145deg, rgba(34, 211, 238, .44), rgba(34, 211, 238, .16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12),
              0 8px 20px rgba(34, 211, 238, .18);
}

@media (max-width: 768px) {
  :root {
    --crm-mobile-header-height: calc(60px + env(safe-area-inset-top, 0px));
  }

  .crm-public-layout {
    display: block;
    min-height: calc(100dvh - var(--crm-mobile-header-height));
  }

  .crm-mobile-header {
    display: flex;
    height: var(--crm-mobile-header-height);
  }

  .crm-public-main {
    min-height: calc(100dvh - var(--crm-mobile-header-height));
  }

  .crm-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: min(300px, calc(100vw - 32px));
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
    overscroll-behavior: contain;
  }

  .crm-sidebar:hover,
  .crm-sidebar:focus-within,
  .crm-sidebar.crm-sidebar--pinned {
    width: min(300px, calc(100vw - 32px));
  }

  .crm-sidebar:focus {
    outline: none;
  }

  .crm-sidebar__inner {
    width: 100%;
  }

  .crm-sidebar .crm-sidebar__brand {
    gap: 8px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .crm-sidebar .crm-sidebar__brand-link {
    width: auto !important;
    min-width: 0;
    flex: 1 1 auto;
  }

  .crm-sidebar__mobile-close {
    display: inline-flex;
  }

  .crm-sidebar__toggle {
    display: none;
  }

  body.crm-sidebar-mobile-open {
    overflow: hidden;
  }

  body.crm-sidebar-mobile-open .crm-sidebar {
    transform: translateX(0);
  }

  body.crm-sidebar-mobile-open .crm-sidebar-backdrop:not([hidden]) {
    display: block;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .crm-sidebar,
  .crm-sidebar__brand-link,
  .crm-sidebar__brand-copy,
  .crm-sidebar__link,
  .crm-sidebar__label,
  .crm-sidebar__icon,
  .crm-sidebar__user-text,
  .crm-sidebar__actions,
  .crm-sidebar__group-label {
    transition-duration: .01ms;
  }
}
