/* styles-chat-notify.css — лист «Чат → Уведомления» (светлый, 28.09.2026).
   Как остальные листы кабинета: шапка и плашки-фильтры — на тёмном фоне
   страницы в стиле кнопок (.plan-btn: тёмная полупрозрачная, выбранная —
   оранжевая --module-active); ниже светлый лист с таблицей как в «Графике смен»
   (.plan-table: синяя шапка #2f5f8a→#284d72, линии #c6d2df, зебра).
   Разметка — pages-chat-notify-view.js. Высоту листа держит
   .page-shell.chat-notify-mode (styles-chat.css). */

.ntf-sheet {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #dce8fb;
}

.ntf-i {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ── шапка на тёмном фоне страницы ───────────────────────────────────────── */
.ntf-top { flex: 0 0 auto; display: grid; gap: 10px; }

.ntf-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ntf-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(125, 158, 209, 0.4);
  background: rgba(10, 28, 52, 0.62);
  color: #dce8fb;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ntf-chip .ntf-i { width: 15px; height: 15px; opacity: 0.85; }
.ntf-company { font-weight: 700; font-size: 13px; color: #c4dcf2; }
.ntf-title { margin: 0 0 0 auto; font-size: 21px; font-weight: 900; letter-spacing: -0.01em; color: #edf4ff; white-space: nowrap; }

/* плашки: как кнопки листов — тёмные, выбранная оранжевая; тип — цветом иконки */
.ntf-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }

.ntf-kpi {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  border: 1px solid rgba(125, 158, 209, 0.4);
  background: rgba(10, 28, 52, 0.62);
  transition: border-color 0.12s, background 0.12s;
}

.ntf-kpi:hover { border-color: rgba(125, 158, 209, 0.8); background: var(--module-hover, rgba(122, 161, 223, 0.2)); }
.ntf-kpi:focus-visible { outline: 2px solid #ffd696; outline-offset: 2px; }

.ntf-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ntf-c, #1f3f63);
  background: var(--ntf-cb, #e3eaf3);
}

.ntf-kpi-tx { display: grid; min-width: 0; }
.ntf-kpi-n { font-weight: 800; font-size: 20px; line-height: 1.05; font-variant-numeric: tabular-nums; color: #edf4ff; }
.ntf-kpi-l { font-weight: 700; font-size: 11.5px; color: #b7c8e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* на тёмном — светлый оттенок цвета типа */
.ntf-kpi .ntf-ic { color: var(--ntf-cl, #c4dcf2); background: rgba(255, 255, 255, 0.08); }

.ntf-kpi.is-zero { opacity: 0.5; }
.ntf-kpi.is-active { opacity: 1; background: var(--module-active); border-color: rgba(255, 214, 150, 0.55); box-shadow: 0 6px 14px rgba(255, 149, 35, 0.22); }
.ntf-kpi.is-active .ntf-kpi-n,
.ntf-kpi.is-active .ntf-kpi-l { color: #1e2024; }
.ntf-kpi.is-active .ntf-ic { color: #1e2024; background: rgba(255, 255, 255, 0.35); }

.ntf-c-all { --ntf-c: #1f3f63; --ntf-cb: #e3eaf3; --ntf-cl: #c4dcf2; }
.ntf-c-manager_call { --ntf-c: #7c3aed; --ntf-cb: #ede9fe; --ntf-cl: #c4b5fd; }
.ntf-c-shift_control { --ntf-c: #2563eb; --ntf-cb: #dbeafe; --ntf-cl: #93c5fd; }
.ntf-c-pause { --ntf-c: #d97706; --ntf-cb: #fef3c7; --ntf-cl: #fcd34d; }
.ntf-c-integration_error { --ntf-c: #dc2626; --ntf-cb: #fee2e2; --ntf-cl: #fca5a5; }
.ntf-c-birthday { --ntf-c: #db2777; --ntf-cb: #fce7f3; --ntf-cl: #f9a8d4; }
.ntf-c-shift_request { --ntf-c: #059669; --ntf-cb: #d1fae5; --ntf-cl: #6ee7b7; }

/* ── светлое тело: инструменты + таблица ─────────────────────────────────── */
.ntf-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 12px; border-radius: 12px; background: #e8edf5; color: #1d2a3b; }

.ntf-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ntf-sp { flex: 1 1 auto; }

.ntf-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  width: 280px;
  max-width: 100%;
  border: 1px solid #b6c9df;
  border-radius: 8px;
  background: #fff;
  color: #7d93ad;
}

.ntf-search .ntf-i { width: 15px; height: 15px; }
.ntf-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 12.5px; color: #1d2a3b; }
.ntf-search input::placeholder { color: #7d93ad; }
.ntf-search:focus-within { border-color: #2f5f8a; }

.ntf-seg { display: inline-flex; height: 32px; border: 1px solid #b6c9df; border-radius: 8px; overflow: hidden; background: #fff; }
.ntf-seg button { font: inherit; font-weight: 700; font-size: 12px; border: 0; background: none; padding: 0 12px; color: #4d6a8c; cursor: pointer; }
.ntf-seg button + button { border-left: 1px solid #b6c9df; }
.ntf-seg button:hover { background: #eef3f9; }
.ntf-seg button.is-active { background: #1f3f63; color: #fff; }

.ntf-range { display: inline-flex; align-items: center; gap: 4px; color: #7d93ad; }
.ntf-range input { height: 32px; border: 1px solid #b6c9df; border-radius: 8px; background: #fff; color: #1d2a3b; font: inherit; font-size: 12px; padding: 0 6px; color-scheme: light; }

.ntf-tog { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; color: #4d6a8c; cursor: pointer; user-select: none; }
.ntf-tog input { margin: 0; accent-color: #1f3f63; }

.ntf-reset { all: unset; cursor: pointer; font-weight: 700; font-size: 12px; color: #4d6a8c; padding: 6px 8px; border-radius: 7px; }
.ntf-reset:hover { background: #dfe7f1; color: #1d2a3b; }
.ntf-reset[hidden] { display: none; }

.ntf-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #b6c9df;
  border-radius: 10px;
  background: #f9fbfe;
}

.ntf-table { width: 100%; min-width: 620px; border-collapse: collapse; table-layout: fixed; }

.ntf-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #2f5f8a, #284d72);
  color: #ebf3ff;
  font-weight: 700;
  font-size: 11.5px;
  text-align: left;
  padding: 8px 12px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

/* Линии клеток и зебра — как .plan-table «Графика смен». */
.ntf-table tbody td { padding: 7px 12px; border-right: 1px solid #c6d2df; border-bottom: 1px solid #c6d2df; vertical-align: middle; font-size: 13px; background: #f9fbfe; }
.ntf-table tbody td:last-child,
.ntf-table thead th:last-child { border-right: 0; }
.ntf-table tbody tr:nth-child(even) td { background: #edf2f8; }
.ntf-table tbody tr:hover td { background: #dfe9f6; }

.ntf-emp { overflow: hidden; }
.ntf-emp-name { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1d2a3b; }
.notify-card.is-unread .ntf-emp-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: #2563eb; }

/* Событие: иконка + фраза + подсказка в одну строку; не влезло — многоточие,
   полный текст в title ячейки. */
.ntf-table td.ntf-ev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntf-ev .ntf-ic { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; vertical-align: middle; margin-right: 10px; }
.ntf-ev .ntf-ic .ntf-i { width: 15px; height: 15px; }
.ntf-ev-t { font-weight: 600; color: #1d2a3b; white-space: nowrap; vertical-align: middle; }
.ntf-ev-h { color: #7d93ad; font-size: 12px; margin-left: 8px; white-space: nowrap; vertical-align: middle; }
.ntf-ev.is-warn .ntf-ev-t { color: #b45309; }
.ntf-ev.is-ok .ntf-ev-t { color: #047857; font-weight: 700; }

/* Дата крупно и тёмным, время под ней мелко и серым — две строки, не «набор цифр». */
.ntf-when { white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ntf-when-d { display: block; font-size: 13px; font-weight: 700; color: #1d2a3b; }
.ntf-when-t { display: block; font-size: 11px; font-weight: 600; color: #7d93ad; }

.ntf-act { text-align: right; white-space: nowrap; }

.ntf-del {
  all: unset;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #94a3b8;
  opacity: 0;
  vertical-align: middle;
  transition: opacity 0.12s;
}

.notify-card:hover .ntf-del,
.ntf-del:focus-visible { opacity: 1; }
.ntf-del:hover { color: #dc2626; background: #fff; }
.ntf-del:disabled { opacity: 0.4; cursor: default; }
.ntf-del .ntf-i { width: 15px; height: 15px; }

.ntf-open {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 4px;
  padding: 4px 8px 4px 11px;
  border-radius: 7px;
  background: #059669;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  vertical-align: middle;
}

.ntf-open:hover { background: #047857; }
.ntf-open .ntf-i { width: 14px; height: 14px; }

.ntf-table tbody tr.is-request td { background: #effbf5; }
.ntf-table tbody tr.is-request td:first-child { box-shadow: inset 3px 0 0 #059669; }

.ntf-empty { padding: 36px 16px; text-align: center; color: #7d93ad; font-weight: 600; }

@media (max-width: 1200px) {
  .ntf-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .ntf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ntf-title { margin-left: 0; width: 100%; font-size: 19px; }
  .ntf-search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ntf-kpi, .ntf-del { transition: none; }
}

/* Статус отпрашивания (живой, с сервера): ждёт / одобрено / отказано / отозвано. */
.ntf-st { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.ntf-st.is-wait { background: #fef3c7; color: #b45309; }
.ntf-st.is-ok { background: #dcfce7; color: #15803d; }
.ntf-st.is-no { background: #fee2e2; color: #b91c1c; }
.ntf-st.is-off { background: #e5eaf0; color: #475569; }
.ntf-open.is-quiet { background: #e3eaf3; color: #1f3f63; }
.ntf-open.is-quiet:hover { background: #d3deea; }
