.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;
}

/* Панель-обвязка таблицы убрана (рамка/отступ путали UX): таблица тянется
   во всю ширину и сама несёт скруглённые углы. */
.notify-list {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.notify-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  padding-right: 0;
  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; }

/* ── Центральный список уведомлений — светлая таблица в стиле стандартных
   таблиц приложения (.plan-table): синяя шапка, белые строки с зеброй.
   Светлая поверхность намеренно контрастирует с тёмной панелью вокруг —
   так центр читается лучше (цель правки). Класс .notify-card сохранён на
   <tr> ради обработчиков «прочитано»/удаление в pages-chat.js. */
.notify-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #1d2a3b;
  font-size: 12px;
  border-radius: 16px;
}

.notify-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #2f5f8a, #284d72);
  color: #ebf3ff;
  font-weight: 700;
  font-size: 11px;
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid #1f3c5a;
  white-space: nowrap;
}
.notify-table thead th:first-child { border-top-left-radius: 16px; }
.notify-table thead th:last-child { border-top-right-radius: 16px; }

/* Ширины колонок — из <colgroup> (ресайз + persist, pages-chat-notify-cols.js);
   «Описание» (col 2) гибкая, тянется. Здесь — только выравнивание Дата/🗑. */
.notify-table th:nth-child(5), .notify-table td:nth-child(5) { text-align: center; }
.notify-table th:nth-child(6), .notify-table td:nth-child(6) { text-align: center; }

/* Высота строки фиксирована (46px): при ресайзе колонок не меняется,
   «Описание» при этом до 2 строк (line-clamp ниже). */
.notify-table tbody td {
  background: #f9fbfe;
  border-bottom: 1px solid #d8e1ec;
  padding: 6px 10px;
  height: 46px;
  vertical-align: middle;
  overflow: hidden;
}
.notify-table tbody tr:nth-child(even) td { background: #eef3fa; }
.notify-table tbody tr:hover td { background: #e2edf9; }
.notify-table tbody tr.is-unread { cursor: pointer; }
.notify-table tbody tr:last-child td { border-bottom: 0; }
.notify-table tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
.notify-table tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }

/* Вертикальные линии столбцов — видно границы и где тянуть (как в листах).
   Линии только между 5 данными-столбцами; 🗑 и хвостовая распорка — без линии. */
.notify-table thead th:nth-child(-n+5) { border-right: 1px solid rgba(255, 255, 255, 0.16); }
.notify-table tbody td:nth-child(-n+5) { border-right: 1px solid #d8e1ec; }
.notify-col-spacer-col { width: auto; }

/* Левый цветной акцент строки по типу события (как было у карточки). */
.notify-table tbody tr td:first-child { box-shadow: inset 3px 0 0 #4ba4f0; }
.notify-table tbody tr.notify-row-manager_call td:first-child { box-shadow: inset 3px 0 0 #d7749a; }
.notify-table tbody tr.notify-row-pause td:first-child { box-shadow: inset 3px 0 0 #5fb0ef; }
.notify-table tbody tr.notify-row-integration_error td:first-child { box-shadow: inset 3px 0 0 #efab3d; }
.notify-table tbody tr.notify-row-birthday td:first-child { box-shadow: inset 3px 0 0 #35c97e; }

/* Прочитанные строки — приглушённее. */
.notify-table tbody tr:not(.is-unread) td { color: #5c6b80; }
.notify-table tbody tr:not(.is-unread) .notify-emp-name { color: #41526a; }
.notify-table tbody tr:not(.is-unread) .notify-card-badge { opacity: 0.66; }

.notify-cell-emp { min-width: 0; }
.notify-emp-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.notify-emp-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid #cdd9e7;
  background: #eef4fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #3a5d86;
}
.notify-emp-icon.is-pink { color: #c45c86; }
.notify-emp-icon.is-sky { color: #2f80c4; }
.notify-emp-icon.is-amber { color: #c0871f; }
.notify-emp-icon.is-violet { color: #2f9e63; }
.notify-emp-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #33455f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.notify-table tbody tr.is-unread .notify-emp-name::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e74d6;
  margin-right: 7px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
/* «Описание» — отдельный столбец: операция · № задания · ответственный.
   До 2 строк (line-clamp); высота строки держит фикс высоты ячейки (46px). */
.notify-cell-desc {
  font-size: 10.5px;
  line-height: 1.22;
  color: #5a6b80;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
}
.notify-table tbody tr:not(.is-unread) .notify-cell-desc { color: #76859a; }

.notify-cell-type {
  font-size: 11.5px;
  font-weight: 700;
  color: #28456a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-cell-event { overflow: hidden; }
.notify-event-empty { color: #9aa9bd; }

.notify-cell-date {
  font-size: 10px;
  font-weight: 700;
  color: #41526a;
  white-space: nowrap;
  line-height: 1.18;
}
/* Дата — основной тон; время — мельче и приглушённым (полупрозрачным) цветом,
   отдельной строкой, чтобы дату и время было легко различать. */
.notify-date-d { display: block; }
.notify-date-t {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: #9aa9bd;
}

/* «Событие» — светлая пилюля, палитра как у статус-пилюль приложения
   (access-status-pill). Порядок цветов сохранён с тёмной карточки. */
.notify-card-badge {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #cdd6e2;
  background: #eef1f5;
  color: #56657c;
  vertical-align: middle;
}
/* Закрытие смены — рутина: холодная сине-бирюзовая семья. */
.notify-card-badge.is-auto { background: #e4eefa; border-color: #b9d2ee; color: #2c5f93; }
.notify-card-badge.is-master { background: #e0f1f2; border-color: #aed9dd; color: #2a7a82; }
.notify-card-badge.is-manual { background: #eef1f5; border-color: #cdd6e2; color: #56657c; }
/* Открытие смены вне графика — янтарное предупреждение. */
.notify-card-badge.is-off-schedule { background: #f8eed8; border-color: #ead7aa; color: #8f611f; }
/* Вызов руководителя — розовый, нужно действие сейчас. */
.notify-card-badge.is-leader-call { background: #f9e2ec; border-color: #ecbcd0; color: #a8436c; }
/* Пауза / простой — голубой sky. */
.notify-card-badge.is-pause { background: #e3f0fb; border-color: #bcdcf3; color: #2f6fa0; }
/* Ошибка интеграции — приглушённый красно-коричневый. */
.notify-card-badge.is-integration-error { background: #f7e5de; border-color: #e9c2b2; color: #9a4f33; }
/* День рождения — изумрудный. */
.notify-card-badge.is-birthday { background: #e0f2e6; border-color: #a8d9b7; color: #256c3d; }

.notify-card-trash {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid #c6d2df;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7a90;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.notify-card-trash:hover {
  border-color: #e0a3a3;
  background: #fbeaea;
  color: #c0504d;
}

.notify-card-trash:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.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; }
}
