/* Стили общего каркаса: шторка уведомлений и счётчики новостей по обращениям.
   Вынесены из _Layout — они одинаковы на всех страницах и раньше приезжали
   заново с каждым HTML-ответом, минуя кэш браузера. */

.notif-badge {
        position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px;
        padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
        font: 700 9.5px "JetBrains Mono", monospace; line-height: 16px; text-align: center;
        border: 2px solid var(--surface); box-sizing: content-box;
    }
    .notif-backdrop {
        position: fixed; inset: 0; z-index: 1090; background: rgba(2,10,12,.4);
        backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
        opacity: 0; pointer-events: none; transition: opacity .18s ease;
    }
    [data-theme="light"] .notif-backdrop { background: rgba(10,34,38,.25); }
    .notif-backdrop.open { opacity: 1; pointer-events: auto; }
    .notif-drawer {
        position: fixed; top: 0; right: 0; z-index: 1091; height: 100vh; width: 400px; max-width: 92vw;
        background: var(--surface); border-left: 1px solid var(--border);
        box-shadow: -20px 0 60px -20px rgba(0,0,0,.5);
        display: flex; flex-direction: column;
        transform: translateX(100%); transition: transform .24s cubic-bezier(.2,.7,.2,1);
    }
    .notif-drawer.open { transform: translateX(0); }
    .notif-drawer__head { padding: 18px 20px 0; flex-shrink: 0; }
    .notif-drawer__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .notif-drawer__top h3 { margin: 0; font: 800 18px "Inter", sans-serif; letter-spacing: -.015em; }
    .notif-close {
        width: 32px; height: 32px; border-radius: var(--r-pill); border: 1px solid var(--border);
        background: var(--card); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center;
        cursor: pointer; transition: .15s;
    }
    .notif-close:hover { background: var(--card-hi); color: var(--text); border-color: var(--border-hi); }
    .notif-tabs { display: flex; padding: 3px; background: var(--card-hi); border: 1px solid var(--border);
        border-radius: var(--r-pill); margin: 16px 0 0; }
    .notif-tabs button { flex: 1; padding: 8px 14px; border: none; background: transparent;
        font: 600 12.5px "Inter", sans-serif; color: var(--text-3); border-radius: var(--r-pill); cursor: pointer; transition: .15s; }
    .notif-tabs button:hover { color: var(--text); }
    .notif-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
    .notif-actions { display: flex; justify-content: flex-end; padding: 10px 0 6px; }
    .notif-actions button { background: none; border: none; cursor: pointer; color: var(--accent);
        font: 600 11.5px "Inter", sans-serif; padding: 2px 4px; }
    .notif-actions button:hover { text-decoration: underline; }
    .notif-body { flex: 1; overflow-y: auto; padding: 6px 14px 18px; }

    .notif-pane { display: none; } .notif-pane.on { display: block; }

    .notif-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: start;
        padding: 12px 10px; border-radius: var(--r-md); cursor: default; position: relative; transition: background .12s; }
    .notif-item:hover { background: var(--card); }
    .notif-item.unread { background: var(--me-bg); }
    .notif-item.unread:hover { background: var(--me-bg); }
    .notif-item__ic { width: 34px; height: 34px; border-radius: 9px; background: var(--card-hi); border: 1px solid var(--border);
        display: flex; align-items: center; justify-content: center; font-size: 16px; }
    .notif-item__tx { min-width: 0; }
    .notif-item__title { font: 600 13.5px "Inter", sans-serif; line-height: 1.3; letter-spacing: -.005em; }
    .notif-item__body { font: 400 12px "Inter", sans-serif; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
    .notif-item__time { font: 400 9.5px "JetBrains Mono", monospace; color: var(--text-4); letter-spacing: .04em; white-space: nowrap; }
    .notif-item__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
    .notif-empty { text-align: center; color: var(--text-3); font: 400 13px "Inter", sans-serif; padding: 48px 16px; }

    .notif-goto {
        display: inline-block; margin-top: 8px;
        font: 600 12px "Inter", sans-serif; color: var(--accent); text-decoration: none;
    }
    .notif-goto:hover { text-decoration: underline; }

    .notif-rate { margin-top: 8px; }
    .notif-rate__lbl { font: 400 10.5px "JetBrains Mono", monospace; color: var(--text-3); letter-spacing: .06em; margin-bottom: 5px; }
    .notif-rate__btns { display: flex; flex-wrap: wrap; gap: 4px; }
    .notif-rate__btns button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border);
        background: var(--card-hi); color: var(--text-2); font: 600 11.5px "Inter", sans-serif; cursor: pointer; transition: .12s; }
    .notif-rate__btns button:hover { border-color: var(--accent); color: var(--text); }
    .notif-rate__btns button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
    .notif-rate__done { font: 500 10.5px "JetBrains Mono", monospace; color: var(--accent); letter-spacing: .06em; }

    .notif-grp { font: 500 10px "JetBrains Mono", monospace; letter-spacing: .14em; color: var(--text-4);
        text-transform: uppercase; padding: 16px 10px 8px; }
    .notif-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: var(--r-sm); }
    .notif-set:hover { background: var(--card); }
    .notif-set__label { font: 500 13px "Inter", sans-serif; color: var(--text-2); }
    .notif-switch { position: relative; width: 38px; height: 22px; border: none; border-radius: 999px;
        background: var(--border-hi); cursor: pointer; transition: background .15s; flex-shrink: 0; padding: 0; }
    .notif-switch.on { background: var(--accent); }
    .notif-switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
        background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
    .notif-switch.on i { transform: translateX(16px); }

    @media (max-width: 520px) { .notif-drawer { width: 100%; max-width: 100%; } }

/* Новости по обращениям в обратную связь: число в пункте меню пользователя, точки на кнопке
   меню и на вкладке нижней панели. Включает layout.js по полю feedback из /api/notifications/count. */
.psn-dd__count {
        margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
        background: var(--accent); color: var(--on-accent);
        font: 700 10px "JetBrains Mono", monospace; line-height: 18px; text-align: center;
    }
    .psn-user { position: relative; }
    .psn-user__dot, .psn-tabbar__dot {
        position: absolute; width: 8px; height: 8px; border-radius: 50%; pointer-events: none;
        background: var(--accent); border: 2px solid var(--surface); box-sizing: content-box;
    }
    .psn-user__dot { top: 0; left: 24px; }
    .psn-tabbar__dot { top: 10px; left: calc(50% + 5px); }

    /* Глобальное флеш-сообщение (?deleted=1 после удаления аккаунта) */
    .pst-flash {
        max-width: 1180px; margin: 18px auto 0; padding: 12px 18px;
        border-radius: var(--r-md); font: 500 13px "Inter", sans-serif;
        background: rgba(111,203,95,.12); color: #6fcb5f; border: 1px solid rgba(111,203,95,.35);
    }
