/* Уведомления у колокольчика (r9 · N, 22.10.2026) — панель в языке «тёмного ядра» (core.css), как окна .sheet.is-core.
   Кирилл 22.10: «так же переделай как нибудь красиво уведомления» (снимок r9-kirill-shots/k4: светлый список лиловых
   плашек). Разметка — js/core/shell.js (bellPop): App.ui.popover(…, { cls: 'is-core ntf-pop' }) → .menu.pop.is-core.ntf-pop.
     .ntf          — колонка панели: шапка .ntf-h, отбор .ntf-chips, список .ntf-list (группы .ntf-g), подвал .ntf-f
     .ntf-i        — строка: .ntf-a (ссылка на запись: значок .ntf-ic, заголовок .ntf-tt, время .ntf-time, что .ntf-x,
                     кому .ntf-who) и действия .ntf-do (видны при наведении и фокусе, на месте времени)
     .is-new       — новое: лиловая точка на значке, лёгкая лиловая подложка;  .is-late — опоздание: янтарная кромка слева
   Тона значка (data-tone): lilac (обычное), amber (ждём / опаздываем), mint (деньги пришли), mute (справочное). Красного
   нет. Одинаково в светлой и тёмной теме программы. Движение (выезд, вступление строк, колокольчик) гаснет при «уменьшить
   движение». */

/* ── Рама панели ── */
.menu.is-core.ntf-pop {
  max-width: calc(100vw - 16px); padding: 0; overflow: hidden; border-radius: 20px; color: var(--k-ink);
  border: 1px solid rgba(var(--k-li), .30);
  background:
    radial-gradient(70% 170px at 10% 0%, rgba(124, 77, 255, .36), transparent 72%),
    radial-gradient(46% 150px at 100% 0%, rgba(94, 234, 212, .08), transparent 72%),
    radial-gradient(80% 240px at 88% 106%, rgba(139, 92, 246, .24), transparent 70%),
    linear-gradient(168deg, #1e1244 0%, #160d35 46%, #0f0a26 100%);
  box-shadow: 0 34px 90px -26px rgba(9, 5, 28, .9), 0 0 0 1px rgba(var(--k-on), .02), 0 0 56px -24px rgba(139, 92, 246, .7), inset 0 1px 0 rgba(var(--k-on), .07);
  transform-origin: calc(100% - 28px) -10px;
  animation: ntf-in .26s cubic-bezier(.2, .9, .25, 1) both;
}
/* лиловое свечение у шапки (r32 — без сетки), к списку гаснет; блик по верхней кромке стекла */
.ntf-pop::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 120px at 16% 0%, rgba(167, 139, 250, .2), transparent 100%);
  -webkit-mask-image: radial-gradient(75% 130px at 16% 0%, #000 0%, transparent 100%); mask-image: radial-gradient(75% 130px at 16% 0%, #000 0%, transparent 100%); }
.ntf-pop::after { content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(221, 214, 254, .75) 30%, rgba(153, 246, 228, .45) 70%, transparent); }
.ntf-ghost { pointer-events: none !important; animation: ntf-out .17s cubic-bezier(.4, 0, 1, 1) both !important; }
@keyframes ntf-in { from { opacity: 0; transform: translateY(-8px) scale(.965); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ntf-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scale(.975); } }

.ntf { position: relative; z-index: 1; display: flex; flex-direction: column; max-height: min(720px, calc(100vh - 64px)); outline: none; }

/* ── Шапка: значок в стекле, «Уведомления», сколько новых, «Прочитать все» ── */
.ntf-h { display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px 16px; }
.ntf-hic { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px;
  color: var(--k-soft, #ede9fe); border: 1px solid rgba(var(--k-li), .42);
  background: radial-gradient(120% 120% at 25% 15%, rgba(var(--k-li), .34), rgba(124, 58, 237, .12) 60%, rgba(var(--k-on), .03));
  box-shadow: 0 0 24px -6px rgba(167, 139, 250, .85), inset 0 1px 0 rgba(var(--k-on), .16); }
.ntf-hic svg { transform-origin: 50% 12%; }
.ntf-hic.is-ring svg { animation: ntf-ring 1s .18s ease-in-out both; }
@keyframes ntf-ring { 0%, 100% { transform: rotate(0); } 14% { transform: rotate(14deg); } 28% { transform: rotate(-12deg); } 42% { transform: rotate(8deg); } 56% { transform: rotate(-5deg); } 70% { transform: rotate(2deg); } }
.ntf-ht { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.ntf-ht > b { font-size: 16px; line-height: 20px; font-weight: 650; letter-spacing: -.01em; color: var(--k-hi); }
.ntf-new { display: inline-flex; align-items: center; gap: 0; font-size: 12.5px; line-height: 16px; color: var(--k-mut); white-space: nowrap; }
.ntf-new > b { color: var(--k-hi); font-weight: 650; font-variant-numeric: tabular-nums; }
.ntf-new.is-calm { color: var(--k-mint-ink); }
.ntf-pulse { position: relative; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--k-lilac); box-shadow: 0 0 10px rgba(167, 139, 250, .9); }
.ntf-pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(var(--k-li), .7); animation: ntf-pulse 2.2s ease-out infinite; }
@keyframes ntf-pulse { 0% { transform: scale(.5); opacity: .9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
.ntf-all { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--k-line); background: rgba(var(--k-on), .05); color: var(--k-soft, #ddd6fe); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, box-shadow .2s, transform .16s cubic-bezier(.2, .8, .2, 1); }
.ntf-all:hover { color: var(--k-hi); background: rgba(var(--k-on), .1); border-color: rgba(var(--k-li), .5); box-shadow: 0 0 18px -6px rgba(167, 139, 250, .9); transform: translateY(-1px); }
.ntf-all:active { transform: scale(.97); }
.ntf-all:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 2px; }

/* ── Отбор: стеклянные метки с числом записей ── */
.ntf-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 12px 16px; border-bottom: 1px solid var(--k-line); }
.ntf-chips[hidden] { display: none; }
.ntf-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 4px 0 9px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--k-line); background: rgba(var(--k-on), .04); color: var(--k-mut); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, box-shadow .22s, transform .16s cubic-bezier(.2, .8, .2, 1); }
.ntf-chip > i { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px;
  font-style: normal; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--k-mut); background: rgba(var(--k-on), .08); }
.ntf-chip.is-due > i { color: var(--k-amber-ink); background: rgba(251, 191, 36, .14); }
.ntf-chip:hover { color: var(--k-hi); border-color: rgba(var(--k-li), .34); background: rgba(var(--k-on), .07); }
.ntf-chip:active { transform: scale(.97); }
.ntf-chip[aria-selected="true"] { color: var(--k-hi); border-color: rgba(var(--k-li), .55);
  background: linear-gradient(160deg, rgba(167, 139, 250, .3), rgba(124, 58, 237, .12)); box-shadow: 0 0 18px -6px rgba(167, 139, 250, .9), inset 0 1px 0 rgba(var(--k-on), .1); }
.ntf-chip[aria-selected="true"] > i { color: var(--k-hi); background: rgba(var(--k-on), .16); }
.ntf-chip:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 1px; }

/* ── Список и группы ── */
.ntf-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 10px;
  scrollbar-width: thin; scrollbar-color: rgba(var(--k-li), .32) transparent; }
.ntf-list::-webkit-scrollbar { width: 10px; }
.ntf-list::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(var(--k-li), .32) padding-box; }
.ntf-list::-webkit-scrollbar-track { background: transparent; }
.ntf-gh { display: flex; align-items: center; gap: 8px; padding: 12px 10px 6px; font-size: 11px; line-height: 14px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--k-mut2); }
.ntf-gh::after { content: ''; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, var(--k-line), transparent); }
.ntf-gh.is-now { color: var(--k-soft, #ddd6fe); }
.ntf-gh.is-now::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px; margin-right: -2px; border-radius: 50%; background: var(--k-lilac); box-shadow: 0 0 8px rgba(167, 139, 250, .95); animation: ntf-blink 2.4s ease-in-out infinite; }
@keyframes ntf-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Строка ── */
.ntf-i { position: relative; margin: 2px 0; border-radius: 14px; --do-w: calc(var(--do, 2) * 30px - 4px); }
.ntf-a { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(var(--do-w), auto); column-gap: 12px; row-gap: 3px; align-items: start;
  padding: 11px 10px 11px 14px; border-radius: inherit; border: 1px solid transparent; color: var(--k-ink); text-decoration: none; outline: none;
  transition: background .18s, border-color .18s, box-shadow .22s; }
.ntf-a:hover { color: var(--k-ink); text-decoration: none; }
.ntf-i.is-new .ntf-a { background: linear-gradient(160deg, rgba(167, 139, 250, .13), rgba(124, 58, 237, .035) 70%); }
.ntf-i:hover .ntf-a, .ntf-i:focus-within .ntf-a { background: linear-gradient(160deg, rgba(var(--k-on), .085), rgba(var(--k-on), .025)); border-color: rgba(var(--k-li), .24);
  box-shadow: 0 12px 26px -18px rgba(139, 92, 246, .8); }
.ntf-a:focus-visible { border-color: rgba(var(--k-li), .62) !important; box-shadow: 0 0 0 1px rgba(var(--k-li), .22), 0 0 24px -8px rgba(167, 139, 250, .9) !important; }
/* опоздание — янтарная кромка со свечением (глиф и кромка, без красного) */
.ntf-i.is-late .ntf-a { box-shadow: inset 2px 0 0 rgba(251, 191, 36, .95), inset 14px 0 18px -14px rgba(251, 191, 36, .75); }
.ntf-i.is-late:hover .ntf-a, .ntf-i.is-late:focus-within .ntf-a { box-shadow: inset 2px 0 0 rgba(251, 191, 36, .95), inset 14px 0 18px -14px rgba(251, 191, 36, .75), 0 12px 26px -18px rgba(139, 92, 246, .8); }

/* значок в стекле; новое — лиловая точка на его углу */
.ntf-ic { position: relative; grid-row: 1 / span 3; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px;
  color: var(--k-soft, #ddd6fe); border: 1px solid rgba(var(--k-li), .34);
  background: radial-gradient(120% 120% at 25% 15%, rgba(var(--k-li), .22), rgba(124, 58, 237, .07) 65%, rgba(var(--k-on), .02)); box-shadow: inset 0 1px 0 rgba(var(--k-on), .1); }
.ntf-ic[data-tone="amber"] { color: var(--k-amber-ink); border-color: rgba(251, 191, 36, .34); background: radial-gradient(120% 120% at 25% 15%, rgba(251, 191, 36, .2), rgba(245, 158, 11, .05) 65%, rgba(var(--k-on), .02)); }
.ntf-ic[data-tone="mint"] { color: var(--k-mint-ink); border-color: rgba(94, 234, 212, .32); background: radial-gradient(120% 120% at 25% 15%, rgba(94, 234, 212, .18), rgba(20, 184, 166, .05) 65%, rgba(var(--k-on), .02)); }
.ntf-ic[data-tone="mute"] { color: var(--k-mut); border-color: rgba(var(--k-on), .16); background: rgba(var(--k-on), .05); }
/* от Продажника — его знак на нижнем углу значка (что случилось — значком, кто — знаком) */
.ntf-by { position: absolute; right: -6px; bottom: -6px; display: inline-flex; border-radius: 6px; box-shadow: 0 0 0 2px #1a103c, 0 0 12px -2px rgba(167, 139, 250, .9); }
.ntf-ic::after { content: ''; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #1a103c;
  background: #c4b5fd; box-shadow: 0 0 10px rgba(167, 139, 250, .95); opacity: 0; transform: scale(.3); transition: opacity .25s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ntf-i.is-new .ntf-ic::after { opacity: 1; transform: none; }

.ntf-tt { grid-column: 2; min-width: 0; font-size: 13.5px; line-height: 18px; font-weight: 560; color: rgba(var(--k-ink3, 246, 243, 255), .84); overflow-wrap: anywhere; }
.ntf-i.is-new .ntf-tt { font-weight: 650; color: var(--k-hi); }
.ntf-time { grid-column: 3; grid-row: 1; justify-self: end; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--k-mut2); background: rgba(var(--k-on), .06); transition: opacity .14s; }
.ntf-time.is-now { color: var(--k-soft, #ede9fe); background: rgba(var(--k-li), .16); }
.ntf-i.is-late .ntf-time { color: var(--k-amber-ink); background: rgba(251, 191, 36, .13); }
.ntf-x { grid-column: 2 / 4; min-width: 0; font-size: 12.5px; line-height: 17px; color: var(--k-mut);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ntf-who { grid-column: 2 / 4; min-width: 0; font-size: 11.5px; line-height: 15px; color: var(--k-mut2); }

/* действия строки — на месте времени, при наведении и фокусе */
.ntf-do { position: absolute; top: 9px; right: 10px; z-index: 2; display: flex; gap: 4px; opacity: 0; transform: translateX(6px); pointer-events: none;
  transition: opacity .16s, transform .22s cubic-bezier(.2, .8, .2, 1); }
.ntf-i:hover .ntf-do, .ntf-i:focus-within .ntf-do { opacity: 1; transform: none; pointer-events: auto; }
.ntf-i:hover .ntf-time, .ntf-i:focus-within .ntf-time { opacity: 0; }
.ntf-b { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(var(--k-on), .15); background: rgba(var(--k-dk, 33, 21, 74), .92); color: var(--k-mut); font: inherit;
  transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .16s cubic-bezier(.2, .8, .2, 1); }
.ntf-b:hover { color: var(--k-hi); border-color: rgba(var(--k-li), .55); background: rgba(var(--k-dk, 91, 52, 196), .55); box-shadow: 0 0 14px -4px rgba(167, 139, 250, .95); transform: translateY(-1px); }
.ntf-b:active { transform: scale(.9); }
.ntf-b:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 1px; }
/* «Решить» — главная строки: светлая, как «Оплатить» */
.ntf-b.is-main { color: #3b1f8a; border-color: rgba(var(--k-on), .85); background: linear-gradient(180deg, #ffffff, #e4dbff); box-shadow: 0 0 14px -3px rgba(var(--k-li), .9); }
.ntf-b.is-main:hover { color: #2e1065; background: linear-gradient(180deg, #ffffff, #efe9ff); box-shadow: 0 0 20px -2px rgba(var(--k-li), 1); }

/* пусто */
.ntf-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 24px 38px; text-align: center; font-size: 12.5px; line-height: 17px; color: var(--k-mut); }
.ntf-empty b { margin-top: 4px; font-size: 14px; font-weight: 650; color: var(--k-hi); }

/* ── Подвал ── */
.ntf-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px 9px 10px; border-top: 1px solid var(--k-line);
  background: linear-gradient(180deg, rgba(var(--k-dk, 10, 6, 28), .16), rgba(var(--k-dk, 10, 6, 28), .42)); }
.ntf-f a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--k-soft, #ddd6fe); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s; }
.ntf-f a > svg { color: var(--k-mut2); transition: transform .4s cubic-bezier(.2, .8, .2, 1), color .15s; }
.ntf-f a:hover { color: var(--k-hi); background: rgba(var(--k-on), .07); text-decoration: none; }
.ntf-f a:hover > svg { color: var(--k-lilac); transform: rotate(60deg); }
.ntf-f a:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 1px; }
.ntf-keys { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--k-mut2); white-space: nowrap; }
.ntf-keys kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px;
  font: inherit; font-size: 11px; font-weight: 650; color: var(--k-mut); border: 1px solid rgba(var(--k-on), .16); background: rgba(var(--k-on), .06); }

/* ── Движение: строки вступают по очереди при открытии, при смене отбора — коротко ── */
.ntf.is-in .ntf-i { animation: ntf-row .36s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 24ms + 70ms); }
.ntf-list.is-swap .ntf-i, .ntf-list.is-swap .ntf-empty { animation: ntf-row .24s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes ntf-row { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* колокольчик в шапке, пока панель открыта */
.tb-bell[aria-expanded="true"] { border-color: rgba(167, 139, 250, .7); box-shadow: 0 0 0 3px rgba(167, 139, 250, .16); }

/* низкое окно: шапка и отбор плотнее — списку больше места */
@media (max-height: 640px) {
  .ntf-h { padding: 12px 14px 10px 16px; }
  .ntf-hic { width: 32px; height: 32px; border-radius: 11px; }
  .ntf-chips { padding-bottom: 10px; }
  .ntf-gh { padding-top: 9px; }
}
@media (max-width: 520px) { .ntf-keys { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .menu.is-core.ntf-pop, .ntf.is-in .ntf-i, .ntf-list.is-swap .ntf-i, .ntf-list.is-swap .ntf-empty, .ntf-hic.is-ring svg, .ntf-pulse::after, .ntf-gh.is-now::before { animation: none !important; }
  .ntf-a, .ntf-do, .ntf-b, .ntf-chip, .ntf-all, .ntf-time, .ntf-ic::after, .ntf-f a, .ntf-f a > svg { transition: none !important; }
  .ntf-do { transform: none; }
  .ntf-b:hover, .ntf-all:hover { transform: none; }
}
