/* ── Notiser v2 ─────────────────────────────────────────────────────────── */
:root { --nx-crit: #d32f2f; --nx-warn: #ed6c02; --nx-info: #0288d1; --nx-border: var(--mud-palette-lines-default, #e5e7eb); --nx-muted: var(--mud-palette-text-secondary, #6b7280); --nx-bg: var(--mud-palette-surface, #fff); --nx-hover: var(--mud-palette-action-default-hover, rgba(0,0,0,.04)); }

/* Klocka */
.nx-bell { position: relative; display: inline-flex; }
.nx-badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--nx-warn); color: #fff; font: 700 11px/18px system-ui, sans-serif; text-align: center; pointer-events: none; box-shadow: 0 0 0 2px var(--mud-palette-appbar-background, #1e293b); }
.nx-badge-crit { background: var(--nx-crit); animation: nx-pulse 2s ease-in-out infinite; }
@keyframes nx-pulse { 0%,100% { box-shadow: 0 0 0 2px var(--mud-palette-appbar-background,#1e293b), 0 0 0 0 rgba(211,47,47,.5); } 50% { box-shadow: 0 0 0 2px var(--mud-palette-appbar-background,#1e293b), 0 0 0 6px rgba(211,47,47,0); } }
@media (prefers-reduced-motion: reduce) { .nx-badge-crit { animation: none; } }
.nx-pop { position: absolute; top: calc(100% + 8px); right: -8px; width: min(420px, calc(100vw - 16px)); max-height: min(640px, calc(100vh - 80px)); display: flex; flex-direction: column; background: var(--nx-bg); color: var(--mud-palette-text-primary, #111827); border: 1px solid var(--nx-border); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.08); z-index: 1400; overflow: hidden; }
.nx-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px 16px; }
.nx-pop-title { font-weight: 700; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nx-pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.nx-pill-crit { background: rgba(211,47,47,.12); color: var(--nx-crit); }
.nx-pill-warn { background: rgba(237,108,2,.12); color: var(--nx-warn); }
.nx-pop-tabs { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--nx-border); }
.nx-pop-tabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 16px; font-size: 13px; color: var(--nx-muted); cursor: pointer; }
.nx-pop-tabs button.on { background: var(--mud-palette-primary, #1976d2); color: var(--mud-palette-primary-text, #fff); }
.nx-pop-tabs b { margin-left: 4px; font-weight: 700; }
.nx-pop-body { overflow-y: auto; flex: 1; padding: 4px 0; }
.nx-pop-foot { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--nx-border); font-weight: 600; font-size: 13px; color: var(--mud-palette-primary, #1976d2); text-decoration: none; }
.nx-pop-foot:hover { background: var(--nx-hover); }

/* Dag-rubrik */
.nx-day { position: sticky; top: 0; z-index: 1; padding: 8px 16px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--nx-muted); background: var(--nx-bg); display: flex; gap: 6px; align-items: center; }
.nx-day span { font-weight: 600; background: var(--nx-hover); border-radius: 8px; padding: 0 6px; }

/* Kort */
.nx-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 16px; cursor: pointer; border-left: 3px solid transparent; transition: background .12s; }
.nx-card:hover, .nx-card:focus-visible { background: var(--nx-hover); outline: none; }
.nx-card.nx-sev-critical { border-left-color: var(--nx-crit); }
.nx-card.nx-sev-warning { border-left-color: var(--nx-warn); }
.nx-card.nx-sev-info { border-left-color: var(--nx-info); }
.nx-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.nx-sev-critical .nx-icon { background: rgba(211,47,47,.1); color: var(--nx-crit); }
.nx-sev-warning .nx-icon { background: rgba(237,108,2,.1); color: var(--nx-warn); }
.nx-sev-info .nx-icon { background: rgba(2,136,209,.1); color: var(--nx-info); }
.nx-body { flex: 1; min-width: 0; }
.nx-title { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.35; color: var(--mud-palette-text-primary, #111827); }
.nx-unread .nx-title { font-weight: 700; }
.nx-card:not(.nx-unread) .nx-title { font-weight: 500; }
.nx-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--mud-palette-primary, #1976d2); }
.nx-count { flex: none; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 8px; background: var(--nx-hover); color: var(--nx-muted); }
.nx-msg { font-size: 13px; color: var(--nx-muted); margin-top: 2px; line-height: 1.4; }
.nx-compact .nx-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 12px; color: var(--nx-muted); }
.nx-sev { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.nx-sev .mud-icon-root { font-size: 15px; }
.nx-sev-critical .nx-sev { color: var(--nx-crit); } .nx-sev-warning .nx-sev { color: var(--nx-warn); } .nx-sev-info .nx-sev { color: var(--nx-info); }
.nx-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--nx-border); color: var(--nx-muted); text-decoration: none; }
.nx-chip .mud-icon-root { font-size: 14px; }
a.nx-link:hover { border-color: var(--mud-palette-primary, #1976d2); color: var(--mud-palette-primary, #1976d2); }
.nx-time { margin-left: auto; white-space: nowrap; }
.nx-actions { flex: none; display: flex; align-items: center; opacity: 0; transition: opacity .12s; }
.nx-card:hover .nx-actions, .nx-card:focus-within .nx-actions { opacity: 1; }
@media (hover: none) { .nx-actions { opacity: 1; } }
.nx-compact .nx-actions { flex-direction: column; }
.nx-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; color: var(--nx-muted); text-align: center; }
.nx-empty-lg { padding: 64px 16px; }
.nx-empty-lg .t { font-size: 15px; font-weight: 600; }

/* Sida */
.nx-page { max-width: 1100px; }
.nx-page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.nx-sub { color: var(--nx-muted); font-size: 14px; margin-top: 2px; }
.nx-sevbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.nx-sevtile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--nx-border); background: var(--nx-bg); cursor: pointer; color: inherit; transition: border-color .12s, box-shadow .12s; }
.nx-sevtile .mud-icon-root { grid-row: span 2; font-size: 28px; }
.nx-sevtile .n { font-size: 24px; font-weight: 700; line-height: 1.1; }
.nx-sevtile .l { font-size: 12px; color: var(--nx-muted); }
.nx-sevtile.nx-sev-critical .mud-icon-root { color: var(--nx-crit); } .nx-sevtile.nx-sev-warning .mud-icon-root { color: var(--nx-warn); } .nx-sevtile.nx-sev-info .mud-icon-root { color: var(--nx-info); }
.nx-sevtile:hover { box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.nx-sevtile.on.nx-sev-critical { border-color: var(--nx-crit); box-shadow: 0 0 0 1px var(--nx-crit) inset; }
.nx-sevtile.on.nx-sev-warning { border-color: var(--nx-warn); box-shadow: 0 0 0 1px var(--nx-warn) inset; }
.nx-sevtile.on.nx-sev-info { border-color: var(--nx-info); box-shadow: 0 0 0 1px var(--nx-info) inset; }
.nx-tabs .mud-tabs-panels { display: none; }
.nx-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.nx-search { flex: 1 1 240px; max-width: 340px; }
.nx-fsel { flex: 0 1 190px; min-width: 160px; }
.nx-filters .mud-input-control { margin-top: 0 !important; }
.nx-list { background: var(--nx-bg); border: 1px solid var(--nx-border); border-radius: 12px; overflow: hidden; }
.nx-list .nx-card + .nx-card { border-top: 1px solid var(--nx-border); }
.nx-list .nx-day { border-top: 1px solid var(--nx-border); background: var(--mud-palette-background-gray, #f8fafc); }
.nx-list .nx-day:first-child { border-top: 0; }
.nx-more { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; color: var(--nx-muted); font-size: 13px; }
.nx-settings { display: grid; gap: 16px; max-width: 760px; }
.nx-typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.nx-preview { margin-top: 12px; padding: 16px; border: 1px dashed var(--nx-border); border-radius: 8px; background: #fff; color: #1a1a1a; max-height: 420px; overflow: auto; }
@media (max-width: 640px) { .nx-sevbar { grid-template-columns: 1fr; } .nx-time { margin-left: 0; } .nx-fsel { flex: 1 1 45%; } }
