/* Trung tâm thông báo */
.zl-top-badge.is-urgent { background: #e11d48; animation: saNtfPulse 1.6s ease-in-out infinite; }
@keyframes saNtfPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); } 50% { box-shadow: 0 0 0 5px rgba(225, 29, 72, 0); } }

.sa-ntf, .sa-ntf *, .sa-ntf-toasts, .sa-ntf-toasts * { box-sizing: border-box; }
.sa-ntf {
  position: fixed; right: 12px; top: 60px; z-index: 8990; width: 400px; max-width: calc(100vw - 16px);
  max-height: min(640px, calc(100vh - 80px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid #d3deeb; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .35); font-size: 13.5px; color: #0f172a;
}
.sa-ntf[hidden] { display: none; }
.sa-ntf-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.sa-ntf-head b { font-size: 15.5px; margin-right: auto; }
.sa-ntf-link { border: 0; background: none; color: #2563eb; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.sa-ntf-link:hover:not(:disabled) { background: #eff6ff; }
.sa-ntf-link:disabled { color: #94a3b8; cursor: default; }
.sa-ntf-icon { border: 0; background: #f1f5f9; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 14px; display: grid; place-items: center; color: #334155; }
.sa-ntf-icon:hover { background: #e2e8f0; }
.sa-ntf-head .sa-ntf-icon[data-act="back"] + b { margin-right: auto; }

.sa-ntf-tabs { display: flex; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid #eef2f7; }
.sa-ntf-tabs button { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: #475569; cursor: pointer; }
.sa-ntf-tabs button.is-on { background: #0f172a; border-color: #0f172a; color: #fff; }
.sa-ntf-tabs em { font-style: normal; display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }

.sa-ntf-perm { display: flex; align-items: center; gap: 10px; margin: 10px 14px 0; padding: 9px 11px; border-radius: 11px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 12.5px; }
.sa-ntf-perm button { flex: none; border: 0; background: #ea580c; color: #fff; font: inherit; font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 9px; cursor: pointer; }

.sa-ntf-list { overflow-y: auto; padding: 6px; flex: 1; overscroll-behavior: contain; }
.sa-ntf-item { position: relative; display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 26px 10px 10px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; border-left: 3px solid transparent; }
.sa-ntf-item:hover { background: #f8fafc; }
.sa-ntf-item.is-unread { background: #f5f9ff; }
.sa-ntf-item.is-unread:hover { background: #eaf2ff; }
.sa-ntf-item.is-urgent { border-left-color: #e11d48; }
.sa-ntf-item.is-important { border-left-color: #f59e0b; }
.sa-ntf-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #f1f5f9; display: grid; place-items: center; font-size: 17px; }
.sa-ntf-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sa-ntf-main b { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.sa-ntf-item.is-unread .sa-ntf-main b { font-weight: 700; }
.sa-ntf-main b em, .sa-ntf-tbody b em { font-style: normal; font-weight: 700; font-size: 11px; color: #64748b; background: #e2e8f0; border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.sa-ntf-body { color: #475569; font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.sa-ntf-main small { color: #94a3b8; font-size: 11.5px; }
.sa-ntf-main small i { font-style: normal; color: #e11d48; font-weight: 700; }
.sa-ntf-dot { position: absolute; right: 10px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; }
.sa-ntf-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 24px; color: #64748b; }
.sa-ntf-empty span { font-size: 30px; opacity: .6; }
.sa-ntf-empty b { color: #334155; }
.sa-ntf-empty small { font-size: 12.5px; line-height: 1.45; }
.sa-ntf-foot { border-top: 1px solid #eef2f7; padding: 8px 12px; text-align: center; }

.sa-ntf-set { overflow-y: auto; padding: 4px 14px 14px; }
.sa-ntf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.sa-ntf-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sa-ntf-row small { color: #64748b; font-size: 12px; line-height: 1.35; }
.sa-ntf-row.is-cat { padding: 8px 0; }
.sa-ntf-row input { flex: none; width: 18px; height: 18px; accent-color: #2563eb; cursor: pointer; }
.sa-ntf-sub { margin: 14px 0 2px; font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.sa-ntf-note { margin: 10px 0 12px; font-size: 12px; color: #64748b; line-height: 1.45; }
.sa-ntf-ok { color: #059669; font-weight: 700; font-size: 12.5px; flex: none; }
.sa-ntf-warn { color: #b45309; font-size: 12px; max-width: 170px; text-align: right; line-height: 1.35; }
.sa-ntf-btn { flex: none; border: 0; background: #2563eb; color: #fff; font: inherit; font-weight: 700; font-size: 12.5px; padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.sa-ntf-btn.is-wide { width: 100%; padding: 10px; }
.sa-ntf-btn:disabled { opacity: .6; cursor: default; }

.sa-ntf-toasts { position: fixed; top: 64px; right: 14px; z-index: 9050; display: flex; flex-direction: column; gap: 8px; width: 360px; max-width: calc(100vw - 20px); pointer-events: none; }
.sa-ntf-toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; background: #fff; border: 1px solid #d3deeb; border-left: 4px solid #2563eb; border-radius: 13px; box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .35); cursor: pointer; animation: saNtfIn .25s ease both; color: #0f172a; font-size: 13px; }
.sa-ntf-toast.is-urgent { border-left-color: #e11d48; background: #fff5f7; }
.sa-ntf-toast.is-important { border-left-color: #f59e0b; }
.sa-ntf-toast.is-out { opacity: 0; transform: translateX(20px); transition: opacity .2s, transform .2s; }
.sa-ntf-tbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sa-ntf-tbody b { font-weight: 700; line-height: 1.35; }
.sa-ntf-tbody span { color: #475569; font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.sa-ntf-x { flex: none; border: 0; background: none; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.sa-ntf-x:hover { color: #0f172a; }
@keyframes saNtfIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .sa-ntf { left: 8px; right: 8px; width: auto; max-width: none; }
  .sa-ntf-toasts { left: 10px; right: 10px; width: auto; top: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .zl-top-badge.is-urgent, .sa-ntf-toast { animation: none; }
  .sa-ntf-toast.is-out { transition: none; }
}
