.sg-topbar-notif { margin-left: auto; position: relative; }
.sg-topbar-bell { position: relative; border: none; background: transparent; color: var(--ink-700);
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.sg-topbar-bell:hover { background: var(--surface-alt); }
.sg-topbar-bell svg { width: 20px; height: 20px; }
.sg-topbar-bell-badge { position: absolute; top: 2px; right: 2px; background: #dc2626;
    color: #fff; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
    display: grid; place-items: center; padding: 0 3px; line-height: 1; }
.sg-topbar-notif-menu { width: 340px; max-width: calc(100vw - 32px); padding: 0; border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.16); border: 1px solid var(--border); overflow: hidden; }
.sg-topbar-notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft); }
.sg-topbar-notif-head strong { font-size: .9rem; color: var(--ink-900); }
.sg-topbar-notif-head a { font-size: .78rem; color: var(--brand-600); text-decoration: none; }
.sg-topbar-notif-head a:hover { text-decoration: underline; }
.sg-topbar-notif-list { max-height: 360px; overflow-y: auto; }
.sg-topbar-notif-empty { padding: 24px; text-align: center; color: var(--ink-400); font-size: .84rem; }
.sg-topbar-notif-item { display: block; width: 100%; text-align: left; border: none; background: transparent;
    padding: 10px 14px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.sg-topbar-notif-item:hover { background: var(--surface-alt); }
.sg-topbar-notif-item:last-child { border-bottom: none; }
.sg-topbar-notif-item--noleida { background: var(--brand-050); }
.sg-topbar-notif-titulo { font-size: .84rem; font-weight: 600; color: var(--ink-900); }
.sg-topbar-notif-texto { font-size: .78rem; color: var(--ink-500); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sg-topbar-notif-fecha { font-size: .68rem; color: var(--ink-300); margin-top: 4px; }

.sg-toast-stack { position: fixed; top: 76px; right: 20px; z-index: 1090; display: flex;
    flex-direction: column; gap: 10px; width: 340px; max-width: calc(100vw - 40px); }
.sg-toast { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: 12px 30px 12px 14px; cursor: pointer;
    position: relative; animation: sgToastIn .18s ease-out; }
@keyframes sgToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.sg-toast-head { display: flex; align-items: flex-start; gap: 10px; }
.sg-toast-ico { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-050);
    display: grid; place-items: center; font-size: 1rem; }
.sg-toast-body { flex: 1 1 auto; min-width: 0; }
.sg-toast-titulo { font-size: .84rem; font-weight: 700; color: var(--ink-900); }
.sg-toast-texto { white-space: pre-line; font-size: .8rem; color: var(--ink-500); margin-top: 2px; overflow: hidden;
    text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sg-toast--largo .sg-toast-texto { display: block; -webkit-line-clamp: unset; overflow: visible; }
.sg-toast-close { position: absolute; top: 6px; right: 6px; border: none; background: transparent;
    color: var(--ink-300); font-size: 1rem; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.sg-toast-close:hover { background: var(--surface-alt); color: var(--ink-700); }
.sg-notif-sonido { border: none; background: transparent; font-size: 1rem; line-height: 1; padding: 2px 4px; border-radius: 6px; cursor: pointer; }
.sg-notif-sonido:hover { background: var(--surface-alt); }
.sg-notif-cta { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand-050);
    border-bottom: 1px solid var(--border-soft); }
.sg-notif-cta-ico { font-size: 1.2rem; }
.sg-notif-cta-texto { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: .76rem;
    color: var(--ink-500); line-height: 1.3; }
.sg-notif-cta-texto strong { font-size: .8rem; color: var(--ink-900); }
.sg-topbar-notif-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sg-topbar-notif-empty svg { width: 28px; height: 28px; opacity: .45; }
.sg-topbar-notif-item { display: flex; align-items: flex-start; gap: 10px; position: relative; }
.sg-notif-cuerpo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sg-notif-punto { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); margin-top: 6px; }
.sg-notif-ico, .sg-toast-ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; display: grid;
    place-items: center; background: var(--brand-050); color: var(--brand-600); }
.sg-notif-ico svg, .sg-toast-ico svg { width: 17px; height: 17px; }
.sg-notif-ico--urgente, .sg-toast-ico--urgente { background: #fdecc8; color: #8a5a00; }
.sg-notif-ico--error, .sg-toast-ico--error { background: var(--danger-050); color: var(--danger-600); }
.sg-notif-ico--chat, .sg-toast-ico--chat { background: var(--brand-050); color: var(--brand-600); }
.sg-toast { overflow: hidden; border-left: 4px solid var(--brand-500); }
.sg-toast--urgente { border-left-color: #d99a2b; box-shadow: 0 12px 34px rgba(217,154,43,.28); }
.sg-toast--error { border-left-color: var(--danger-500); }
.sg-toast-meta { display: flex; align-items: center; gap: 8px; font-size: .68rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 2px; }
.sg-toast-hora { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-300); }
.sg-toast-ver { margin-top: 6px; font-size: .76rem; font-weight: 600; color: var(--brand-600); }
.sg-toast-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-400);
    transform-origin: left; animation: sgToastBarra 9s linear forwards; }
@keyframes sgToastBarra { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.sg-toast--invitacion { cursor: default; border-left-color: var(--brand-500); }
.sg-toast-acciones { display: flex; gap: 8px; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .sg-toast, .sg-toast-barra { animation: none; } }
@media (max-width: 480px) { .sg-toast-stack { top: 66px; left: 10px; right: 10px; width: auto; } }

/* Descartar una notificación sin abrirla: el ✓ reemplaza al puntito y baja el número de la campana */
.sg-notif-descartar { flex: 0 0 auto; align-self: center; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  color: var(--brand-500); background: #fff; border: 1px solid var(--brand-500); cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.sg-notif-descartar:hover, .sg-notif-descartar:focus-visible { background: var(--brand-500); color: #fff; transform: scale(1.1); outline: none; }
