.page-shell.chat-notify-mode {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  height: var(--chat-notify-shell-height, calc(100vh - 172px));
  min-height: var(--chat-notify-shell-height, calc(100vh - 172px));
  overflow: hidden;
}

.notify-shell {
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(42, 78, 128, 0.62);
  border-radius: 18px;
  padding: 10px;
  background:
    radial-gradient(circle at 50% -20%, rgba(54, 96, 159, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(11, 29, 55, 0.94) 0%, rgba(8, 23, 44, 0.96) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notify-headline {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 8px 8px;
  border-bottom: 1px solid rgba(39, 75, 123, 0.62);
}

.notify-headline-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notify-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(50, 89, 143, 0.78);
  background: linear-gradient(180deg, rgba(13, 37, 69, 0.94), rgba(9, 24, 45, 0.96));
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  color: #edf4ff;
}

.notify-company {
  font-size: 14px;
  font-weight: 800;
  color: #c8d8f2;
}

.notify-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  padding-right: 4px;
  white-space: nowrap;
  color: #edf4ff;
  margin: 0;
}

.notify-stats {
  flex: 0 0 auto;
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.notify-stat {
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(42, 78, 126, 0.78);
  background: linear-gradient(180deg, rgba(11, 29, 55, 0.95), rgba(9, 24, 45, 0.97));
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.notify-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(67, 102, 152, 0.76);
  background: rgba(16, 38, 70, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #eef4ff;
  flex: 0 0 auto;
}

.notify-stat-icon.is-amber { color: #ffc65d; }
.notify-stat-icon.is-violet { color: #5de8a0; }
.notify-stat-icon.is-pink { color: #ff93b5; }
.notify-stat-icon.is-sky { color: #73c0ff; }

.notify-stat-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.notify-stat-label {
  font-size: 11px;
  color: #d8e4fa;
  line-height: 1.06;
}

.notify-stat-val {
  font-size: 13px;
  font-weight: 900;
  color: #edf4ff;
}

.notify-main {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.notify-panel {
  border: 1px solid rgba(42, 78, 126, 0.76);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 28, 53, 0.96), rgba(8, 21, 40, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  min-height: 0;
}

.notify-sidebar {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.notify-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.notify-sidebar-scroll::-webkit-scrollbar { width: 8px; }
.notify-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(129, 156, 200, 0.34); border-radius: 999px; }
.notify-sidebar-scroll::-webkit-scrollbar-track { background: rgba(9, 22, 41, 0.2); border-radius: 999px; }

.notify-sidebar-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  color: #edf4ff;
}

.notify-search-box,
.notify-date-toggle,
.notify-date-chip,
.notify-date-action,
.notify-date-input,
.notify-filter,
.notify-reset {
  border: 1px solid rgba(52, 91, 143, 0.82);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 34, 63, 0.96), rgba(11, 26, 47, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.notify-search-box {
  height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #93add2;
  font-size: 12px;
  overflow: hidden;
  flex: 0 0 auto;
}

.notify-search-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #eef4ff;
  font-size: 12px;
  padding: 0;
  font-family: inherit;
}

.notify-search-input::placeholder { color: #93add2; }

.notify-date-box {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notify-date-toggle {
  min-height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #edf4ff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.notify-date-toggle-arrow {
  transition: transform 0.18s ease;
  color: #8da8d1;
  font-size: 12px;
}

.notify-date-box.is-open .notify-date-toggle-arrow { transform: rotate(180deg); }

.notify-date-panel {
  display: none;
  flex-direction: column;
  gap: 6px;
}

.notify-date-box.is-open .notify-date-panel { display: flex; }

.notify-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.notify-date-action {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #edf4ff;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
}

.notify-date-action.is-active {
  border-color: #efb253;
  box-shadow: 0 0 0 1px rgba(239, 178, 83, 0.26) inset;
}

.notify-date-input {
  height: 32px;
  padding: 0 10px;
  outline: none;
  color: #dfe8fb;
  font-size: 12px;
  font-family: inherit;
  color-scheme: dark;
}

.notify-date-input::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.9);
  cursor: pointer;
}

.notify-date-chip {
  min-height: 30px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #b9cbe6;
}

.notify-filters {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notify-filter {
  min-height: 38px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #eef4ff;
  text-decoration: none;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: inherit;
}

.notify-filter.is-active {
  background: linear-gradient(180deg, #efb253 0%, #de9a3e 100%);
  border-color: #efb253;
  color: #131b2d;
}

.notify-filter-ico {
  width: 24px;
  text-align: center;
  font-size: 15px;
  color: inherit;
}

.notify-filter-label {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.notify-filter-count {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid rgba(61, 98, 151, 0.88);
  background: rgba(16, 36, 66, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #f4f8ff;
}

.notify-filter.is-active .notify-filter-count {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(255, 255, 255, 0.12);
  color: #121a2d;
}

.notify-reset {
  flex: 0 0 auto;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #f3f7ff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 2px;
  font-family: inherit;
}

.notify-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.notify-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.notify-scroll::-webkit-scrollbar { width: 10px; }
.notify-scroll::-webkit-scrollbar-thumb { background: rgba(129, 156, 200, 0.34); border-radius: 999px; }
.notify-scroll::-webkit-scrollbar-track { background: rgba(9, 22, 41, 0.28); border-radius: 999px; }

.notify-card {
  min-height: 80px;
  border: 1px solid rgba(42, 77, 126, 0.78);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 32, 60, 0.97), rgba(10, 27, 52, 0.99));
  display: grid;
  grid-template-columns: 4px 50px minmax(0, 1fr) 124px;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  flex: 0 0 auto;
  position: relative;
}
.notify-card.has-badge { grid-template-columns: 4px 50px minmax(0, 1fr) auto 124px; }
.notify-card.is-unread { cursor: pointer; }
.notify-card.is-unread .notify-card-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ea1ff;
  box-shadow: 0 0 8px rgba(78, 161, 255, 0.7);
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.notify-card:not(.is-unread) .notify-card-title { color: rgba(237, 244, 255, 0.58); font-weight: 700; }
.notify-card:not(.is-unread) .notify-card-sub { color: rgba(195, 209, 234, 0.52); }
.notify-card:not(.is-unread) .notify-card-icon { opacity: 0.55; }
.notify-card:not(.is-unread) .notify-card-accent { opacity: 0.4; }
.notify-card:not(.is-unread) .notify-card-date { opacity: 0.72; }

.notify-card-accent {
  align-self: stretch;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, #6bc2ff 0%, #4ba4f0 100%);
}

.notify-card-accent.is-pink { background: linear-gradient(180deg, #f08eb6 0%, #d7749a 100%); }
.notify-card-accent.is-amber { background: linear-gradient(180deg, #ffc95f 0%, #efab3d 100%); }
.notify-card-accent.is-violet { background: linear-gradient(180deg, #5de8a0 0%, #35c97e 100%); }

.notify-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(59, 96, 151, 0.78);
  background: rgba(15, 38, 70, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  font-size: 16px;
  color: #eef4ff;
}

.notify-card-icon.is-pink { color: #ff93b5; }
.notify-card-icon.is-sky { color: #73c0ff; }
.notify-card-icon.is-amber { color: #ffc65d; }
.notify-card-icon.is-violet { color: #5de8a0; }

.notify-card-content {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.notify-card-title {
  font-size: 16px;
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #edf4ff;
  margin: 0;
}

.notify-card-sub {
  font-size: 12px;
  line-height: 1.15;
  color: #c3d1ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.notify-card-badge {
  align-self: center;
  justify-self: center;
  margin: 0 14px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
  background: rgba(60, 80, 110, 0.22);
  color: #d8e3f5;
  text-transform: none;
}
/* Закрытие смены — рутина, низкая важность. Холодная семья (синий →
   бирюза → серо-голубой), чтобы не сливалось с алертами. */
.notify-card-badge.is-auto {
  background: rgba(60, 130, 200, 0.18);
  border-color: rgba(110, 175, 235, 0.50);
  color: #9bc7ee;
}
.notify-card-badge.is-master {
  background: rgba(50, 160, 170, 0.18);
  border-color: rgba(100, 200, 210, 0.50);
  color: #8ed8de;
}
.notify-card-badge.is-manual {
  background: rgba(110, 130, 160, 0.20);
  border-color: rgba(170, 190, 215, 0.42);
  color: #c4d0e2;
}
/* Открытие смены вне графика — предупреждение, янтарный. */
.notify-card-badge.is-off-schedule {
  background: rgba(190, 130, 40, 0.20);
  border-color: rgba(240, 180, 90, 0.55);
  color: #ffcc7a;
}
/* Вызов руководителя — действие нужно прямо сейчас, розовый яркий. */
.notify-card-badge.is-leader-call {
  background: rgba(200, 80, 130, 0.20);
  border-color: rgba(240, 130, 175, 0.55);
  color: #ffa6c6;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Пауза / простой — стоит, не работает; голубой sky (рядом с холодной
   семьёй закрытий, но другой оттенок). */
.notify-card-badge.is-pause {
  background: rgba(60, 165, 220, 0.16);
  border-color: rgba(120, 195, 240, 0.48);
  color: #93cef0;
}
/* Ошибка интеграции — техническая проблема, не алерт мастеру; приглушённо
   красно-коричневый, чтобы отличить от янтарного «Открытие вне графика». */
.notify-card-badge.is-integration-error {
  background: rgba(180, 80, 60, 0.18);
  border-color: rgba(220, 130, 100, 0.50);
  color: #f3a98c;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* День рождения — изумрудный, явно отличается от рабочих событий. */
.notify-card-badge.is-birthday {
  background: rgba(40, 185, 120, 0.18);
  border-color: rgba(80, 225, 160, 0.50);
  color: #5de8a0;
}
.notify-card:not(.is-unread) .notify-card-badge { opacity: 0.62; }

.notify-card-side {
  height: 100%;
  padding: 10px 12px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.notify-card-trash {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(57, 95, 148, 0.8);
  background: rgba(14, 34, 63, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dbe7fd;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.notify-card-trash:hover {
  border-color: rgba(228, 120, 120, 0.6);
  background: rgba(108, 30, 30, 0.55);
  color: #ffb0b0;
}

.notify-card-trash:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.notify-card-date {
  margin-top: auto;
  font-size: 12px;
  font-weight: 900;
  color: #d4def1;
  white-space: nowrap;
}

.notify-empty {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(76, 112, 167, 0.55);
  border-radius: 18px;
  color: #b7c8e6;
  background: rgba(10, 27, 49, 0.45);
  font-size: 13px;
}

.chat-bday-popups {
  position: fixed;
  top: 94px;
  right: 16px;
  z-index: 160;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 24px));
}

.chat-bday-popup {
  border: 1px solid rgba(131, 188, 241, 0.58);
  border-left: 4px solid rgba(106, 176, 238, 0.85);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 39, 72, 0.97), rgba(10, 24, 50, 0.98));
  box-shadow: 0 14px 28px rgba(4, 10, 22, 0.45);
  padding: 10px 36px 10px 12px;
  position: relative;
  animation: chat-bday-slide 220ms ease-out;
}

.chat-bday-popup.is-tomorrow {
  border-left-color: rgba(252, 208, 133, 0.9);
}

.chat-bday-popup-head {
  font-size: 13px;
  font-weight: 800;
  color: #d7ecff;
}

.chat-bday-popup-text {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #d4e8ff;
}

.chat-bday-popup-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(154, 189, 230, 0.4);
  background: rgba(9, 24, 48, 0.7);
  color: #cfe5ff;
  font-size: 12px;
  cursor: pointer;
}

@keyframes chat-bday-slide {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1200px) {
  .page-shell.chat-notify-mode { height: auto; min-height: auto; overflow: visible; }
  .notify-shell { height: auto; }
  .notify-main { grid-template-columns: 1fr; }
  .notify-list { min-height: 420px; }
  .notify-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .notify-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notify-title { font-size: 20px; }
}
