/* "Viewed" markers, pop-up notifications and the login-page notice. */

/* ---------- NEW / viewed markers ---------- */
.new-pill {
  display: inline-block; margin-left: 6px; padding: 1px 7px; vertical-align: middle;
  border-radius: 999px; background: #d4183d; color: #fff;
  font-size: 9.5px; font-weight: 800; letter-spacing: .04em; line-height: 15px;
}
:root[data-theme="dark"] .new-pill { background: #e5334f; }

/* Unviewed report rows: bold, tinted, blue edge. Opening the report clears it. */
table.data-table tbody tr.is-unviewed td { font-weight: 700; background: #eaf1ff; }
table.data-table tbody tr.is-unviewed td:first-child { box-shadow: inset 4px 0 0 var(--blue-600); }
table.data-table tbody tr.is-unviewed:hover td { background: #d9e6ff; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td { background: #17376b; color: #fff; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td:first-child { box-shadow: inset 4px 0 0 #6ea0ff; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed:hover td { background: #1e4482; }

/* Activity Log rows */
.al-table tbody tr.al-row { cursor: pointer; }
.al-table tbody tr.al-row.is-unviewed td { font-weight: 700; background: #eaf1ff; }
.al-table tbody tr.al-row.is-unviewed td:first-child { box-shadow: inset 4px 0 0 var(--blue-600); }
.al-table tbody tr.al-row.is-unviewed:hover td { background: #d9e6ff; }
:root[data-theme="dark"] .al-table tbody tr.al-row.is-unviewed td { background: #17376b; color: #fff; }
:root[data-theme="dark"] .al-table tbody tr.al-row.is-unviewed td:first-child { box-shadow: inset 4px 0 0 #6ea0ff; }
:root[data-theme="dark"] .al-table tbody tr.al-row.is-unviewed:hover td { background: #1e4482; }

.al-viewbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--blue-50); border: 1px solid var(--blue-200); font-size: 13px;
}
.al-viewbar .count { font-weight: 800; color: var(--blue-700); }
@media print { .al-viewbar, .new-pill { display: none !important; } }

/* ---------- Pop-up notifications (bottom-right) ---------- */
.notif-popup-stack {
  position: fixed; right: 18px; bottom: 18px; z-index: 220;
  display: flex; flex-direction: column-reverse; gap: 10px;
  width: min(360px, calc(100vw - 36px));
}
.notif-popup {
  position: relative; display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 34px 12px 12px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--blue-600);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: notifPopIn .35s var(--ease, ease) both;
}
.notif-popup.urgent { border-left-color: #d4183d; }
.notif-popup:hover { background: var(--blue-50); }
.notif-popup.leaving { opacity: 0; transform: translateX(24px); transition: opacity .25s ease, transform .25s ease; }
.notif-popup-icon {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-600); color: #fff;
}
.notif-popup.urgent .notif-popup-icon { background: #d4183d; }
.notif-popup-icon .icon-svg { width: 15px; height: 15px; }
.notif-popup-title { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-700); }
.notif-popup.urgent .notif-popup-title { color: #d4183d; }
.notif-popup-text { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; margin-top: 1px; }
.notif-popup-time { display: block; font-size: 11px; margin-top: 3px; opacity: .7; }
.notif-popup-close {
  position: absolute; top: 4px; right: 6px; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ink); opacity: .55; padding: 4px 6px;
}
.notif-popup-close:hover { opacity: 1; }
.notif-popup-more { text-align: center; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); align-self: flex-end; }
@keyframes notifPopIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .notif-popup-stack { right: 10px; left: 10px; bottom: 10px; width: auto; } }

/* The bell rings briefly when something new arrives while you are on the page. */
#notifToggle.ring .icon-svg { animation: bellRing .9s ease; transform-origin: 50% 0; }
@keyframes bellRing { 0%,100% { transform: rotate(0); } 15% { transform: rotate(18deg); } 30% { transform: rotate(-16deg); }
  45% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }

/* ---------- Login page: "new reports" notice ---------- */
.login-notice {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 11px 13px;
  border-radius: 12px; border: 1px solid var(--blue-200, #bcd3ff); background: var(--blue-50, #eef4ff);
  color: var(--ink, #14213f); font-size: 13px; line-height: 1.35;
}
.login-notice .ln-icon {
  flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--blue-600, #2457b8); color: #fff;
}
.login-notice .ln-icon .icon-svg { width: 17px; height: 17px; }
.login-notice .ln-badge {
  position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: #d4183d; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--blue-50, #eef4ff);
}
.login-notice.has-new { border-color: #f3b3bf; background: #fff1f3; }
.login-notice.has-new .ln-badge { animation: lnPulse 1.8s ease-in-out infinite; }
.login-notice strong { display: block; font-size: 13.5px; }
.login-notice span.sub { display: block; font-size: 12px; opacity: .75; margin-top: 1px; }
@keyframes lnPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* ---- IMPROVED login notices ---- */
.login-notice { flex-direction: column; align-items: stretch; gap: 8px; padding: 9px 11px; animation: lnIn .35s ease both; }
.login-notice .ln-icon { margin-top: 2px; }
.login-notice.has-new .ln-icon { background: #d4183d; }
.login-notice.has-new .ln-icon .icon-svg { animation: bellRing 1.1s ease .4s 2; transform-origin: 50% 0; }
/* ---- login notice v2: header + two number tiles ---- */
.login-notice .ln-head { display: flex; align-items: center; gap: 11px; }
.login-notice .ln-title strong { font-size: 13.5px; }
.login-notice .ln-title .sub { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary, #5b6985); opacity: 1; margin-top: 2px; }
.login-notice .ln-title .sub .icon-svg { width: 13px; height: 13px; flex: none; }
.login-notice .ln-tiles { display: flex; gap: 6px; }
.login-notice .ln-tile { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding: 4px 9px; border-radius: 8px; background: var(--surface, #fff); border: 1px solid var(--blue-200, #bcd3ff); }
.login-notice .ln-tile b { flex: none; font-size: 15px; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; }
.login-notice .ln-tile span { font-size: 11px; line-height: 1.25; font-weight: 600; color: var(--text-secondary, #5b6985); }
.login-notice .ln-new { border-color: #f3b3bf; border-left: 3px solid #d4183d; }
.login-notice .ln-new b { color: #d4183d; }
.login-notice .ln-pend { border-left: 3px solid #e0a100; }
.login-notice .ln-pend b { color: #8a5a00; }
.login-alert-link { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }
@keyframes lnIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.login-alert { align-items: flex-start; gap: 10px; transition: opacity .25s, max-height .25s, margin .25s, padding .25s; max-height: 120px; overflow: hidden; }
.login-alert .icon-svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.login-alert.is-gone { opacity: 0; max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
.login-card.has-error { animation: loginShake .45s ease; }
@keyframes loginShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.login-card .input-icon-field.is-invalid input { border-color: #d4183d; box-shadow: 0 0 0 3px rgba(212,24,61,.14); }
.caps-warn { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; font-size: 12px; font-weight: 600; color: #8a5a00; }
.caps-warn[hidden] { display: none; }
.caps-warn .icon-svg { width: 14px; height: 14px; }
.login-btn.is-busy { opacity: .8; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .login-card.has-error, .login-notice, .login-notice.has-new .ln-icon .icon-svg { animation: none; } }

/* =====================================================================
   NOTIFICATION BELL - clearer unread vs read
   Unread: bold, strong blue tint, thick accent bar, solid icon, dot.
   Read:   normal weight, no tint, muted text, pale icon.
   ===================================================================== */
.notif-dot { background: #d4183d; color: #fff; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; box-shadow: 0 0 0 2px var(--surface); }
.notif-panel-unread { background: #d4183d; color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 800; }
.notif-panel-unread[hidden] { display: none; }

.notif-item { position: relative; border-left: 4px solid transparent; }

.notif-item.is-unread { background: #dbe8ff; border-left-color: #1d4ed8; }
.notif-item.is-unread:hover { background: #c9dcff; }
.notif-item.is-unread .notif-item-text { font-weight: 800 !important; color: #08142e !important; }
.notif-item.is-unread .notif-item-time { font-weight: 700 !important; color: #1d4ed8 !important; }
.notif-item.is-unread .notif-item-icon { background: #1d4ed8 !important; color: #fff !important; }
.notif-item.is-unread::after {
  content: ""; position: absolute; top: 50%; right: 12px; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: #d4183d;
}
.notif-item.is-unread .notif-item-body { padding-right: 18px; }

.notif-item.is-read { background: transparent; border-left-color: transparent; }
.notif-item.is-read:hover { background: var(--blue-50); }
.notif-item.is-read .notif-item-text { font-weight: 400 !important; color: #55627c !important; }
.notif-item.is-read .notif-item-time { font-weight: 400 !important; color: #7a869d !important; }
.notif-item.is-read .notif-item-icon { background: #e6ecf7 !important; color: #6b7a99 !important; }

:root[data-theme="dark"] .notif-item.is-unread { background: #1b3f7a; border-left-color: #8bb4ff; }
:root[data-theme="dark"] .notif-item.is-unread:hover { background: #234c92; }
:root[data-theme="dark"] .notif-item.is-unread .notif-item-text { color: #ffffff !important; }
:root[data-theme="dark"] .notif-item.is-unread .notif-item-time { color: #cfe0ff !important; }
:root[data-theme="dark"] .notif-item.is-unread .notif-item-icon { background: #4f8cff !important; color: #fff !important; }
:root[data-theme="dark"] .notif-item.is-unread::after { background: #ff5d78; }
:root[data-theme="dark"] .notif-item.is-read { background: transparent; }
:root[data-theme="dark"] .notif-item.is-read .notif-item-text { color: #a9b6cc !important; }
:root[data-theme="dark"] .notif-item.is-read .notif-item-time { color: #8190a8 !important; }
:root[data-theme="dark"] .notif-item.is-read .notif-item-icon { background: #1d2c44 !important; color: #8fa0bd !important; }

/* =====================================================================
   VIEWED INDICATOR beside the report count
   Red "N new" = some listed reports not opened yet.
   Green "All viewed" = every listed report has been opened.
   ===================================================================== */
.viewed-ind {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800; line-height: 18px; white-space: nowrap;
  vertical-align: middle; letter-spacing: .02em;
}
.viewed-ind:empty { display: none; }
.viewed-ind.has-new { background: #fde8ec; color: #b4122f; border: 1px solid #f3b3bf; }
.viewed-ind.has-new .vi-dot { width: 8px; height: 8px; border-radius: 50%; background: #d4183d; animation: viPulse 1.8s ease-in-out infinite; }
.viewed-ind.all-viewed { background: #e4f6ea; color: #17703a; border: 1px solid #b5e3c5; }
.viewed-ind.all-viewed .vi-check { font-size: 11px; font-weight: 900; }
:root[data-theme="dark"] .viewed-ind.has-new { background: #4a1a26; color: #ff9db0; border-color: #7a2d3e; }
:root[data-theme="dark"] .viewed-ind.has-new .vi-dot { background: #ff5d78; }
:root[data-theme="dark"] .viewed-ind.all-viewed { background: #15402a; color: #8fe0ad; border-color: #25623f; }
@keyframes viPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .7; } }
@media print { .viewed-ind { display: none !important; } }

/* Sidebar number: reports you have not opened yet */
.sidebar nav a .nav-new {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #d4183d; color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
}
.sidebar nav a .nav-new[hidden] { display: none; }

/* =====================================================================
   COLOUR INDICATORS (update)
   - Unopened reports / Activity Log rows get a strong amber colour + bar.
     The colour disappears as soon as the user opens / clicks the row.
   - Rows the user did themselves get a green "YOURS" style badge.
   ===================================================================== */
table.data-table tbody tr.is-unviewed td,
.al-table tbody tr.al-row.is-unviewed td { background: #fff1c2; color: #3b2a00; font-weight: 700; }
table.data-table tbody tr.is-unviewed td:first-child,
.al-table tbody tr.al-row.is-unviewed td:first-child { box-shadow: inset 6px 0 0 #f59e0b; }
table.data-table tbody tr.is-unviewed:hover td,
.al-table tbody tr.al-row.is-unviewed:hover td { background: #ffe499; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td,
:root[data-theme="dark"] .al-table tbody tr.al-row.is-unviewed td { background: #4a3708; color: #fff4d0; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td:first-child,
:root[data-theme="dark"] .al-table tbody tr.al-row.is-unviewed td:first-child { box-shadow: inset 6px 0 0 #fbbf24; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed:hover td,
:root[data-theme="dark"] .al-table tbody tr.al-row.is-unviewed:hover td { background: #5c4509; }

.new-pill { background: #f59e0b; color: #2b1d00; box-shadow: 0 0 0 0 rgba(245,158,11,.6); animation: newPillPulse 1.8s ease-out infinite; }
:root[data-theme="dark"] .new-pill { background: #fbbf24; color: #2b1d00; }
@keyframes newPillPulse { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.55); } 100% { box-shadow: 0 0 0 8px rgba(245,158,11,0); } }
.al-viewbar { background: #fff6d8; border-color: #f5d27a; }
.al-viewbar .count { color: #a15c00; }
:root[data-theme="dark"] .al-viewbar { background: #3d2e08; border-color: #7a5b12; }
:root[data-theme="dark"] .al-viewbar .count { color: #fbbf24; }

/* Sidebar colour dot (Reports + Activity Log) */
.sidebar nav a .nav-dot {
  margin-left: auto; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 0 0 rgba(245,158,11,.6); animation: newPillPulse 1.8s ease-out infinite;
}
.sidebar nav a .nav-dot[hidden] { display: none; }
.sidebar nav a .nav-dot + .nav-new { margin-left: 6px; }

/* "Yours" badges: reports/log rows the user did */
.mine-wrap { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mine-pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; vertical-align: middle;
  font-size: 10px; font-weight: 800; letter-spacing: .03em; line-height: 16px; white-space: nowrap;
  background: #dff5e6; color: #14663a; border: 1px solid #a9dfbd;
}
.mine-pill.mine-assigned { background: #ece4ff; color: #4b2aa0; border-color: #cbbaf5; }
.mine-pill.mine-done, .mine-pill.mine-did { background: #d6f3f0; color: #0b625a; border-color: #9edcd5; }
.al-user .mine-pill, .al-det .mine-pill { margin-left: 6px; }
:root[data-theme="dark"] .mine-pill { background: #15402a; color: #8fe0ad; border-color: #25623f; }
:root[data-theme="dark"] .mine-pill.mine-assigned { background: #2d2358; color: #c9b8ff; border-color: #4a3b88; }
:root[data-theme="dark"] .mine-pill.mine-done, :root[data-theme="dark"] .mine-pill.mine-did { background: #0f3b37; color: #8fe6dc; border-color: #1f625b; }

table.data-table tbody tr.is-mine:not(.is-unviewed) td:first-child,
.al-table tbody tr.al-row.is-mine:not(.is-unviewed) td:first-child { box-shadow: inset 4px 0 0 #22a35a; }
@media print { .mine-pill, .nav-dot { display: none !important; } }

/* =====================================================================
   REPORT LISTS - unread look matches the notification bell
   Unread: blue tint, bold, thick blue bar on the left, red dot on the right.
   Read:   normal weight, no tint, muted text. Clears once the report is opened.
   ===================================================================== */
table.data-table tbody tr.is-unviewed td { background: #dbe8ff; color: #08142e; font-weight: 800; }
table.data-table tbody tr.is-unviewed td:first-child { box-shadow: inset 5px 0 0 #1d4ed8; }
table.data-table tbody tr.is-unviewed:hover td { background: #c9dcff; }
table.data-table tbody tr.is-unviewed td:last-child { position: relative; padding-right: 30px; }
table.data-table tbody tr.is-unviewed td:last-child::after {
  content: ""; position: absolute; top: 50%; right: 12px; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: #d4183d;
}
table.data-table tbody tr.is-unviewed .new-pill { background: #d4183d; color: #fff; animation: none; box-shadow: none; }
table.data-table tbody tr.is-unviewed .rpt-snip { color: #1d3a73; }

table.data-table tbody tr[data-href]:not(.is-unviewed) td { font-weight: 400; color: #55627c; }
table.data-table tbody tr[data-href]:not(.is-unviewed) .rpt-ticket,
table.data-table tbody tr[data-href]:not(.is-unviewed) .rpt-title,
table.data-table tbody tr[data-href]:not(.is-unviewed) .rpt-who { font-weight: 600; }

:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td { background: #1b3f7a; color: #fff; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td:first-child { box-shadow: inset 5px 0 0 #8bb4ff; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed:hover td { background: #234c92; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed td:last-child::after { background: #ff5d78; }
:root[data-theme="dark"] table.data-table tbody tr.is-unviewed .rpt-snip { color: #cfe0ff; }
:root[data-theme="dark"] table.data-table tbody tr[data-href]:not(.is-unviewed) td { color: #a9b6cc; }


/* ============================================================================
   FIX (mobile / tablet cards): blank white box beside a lone cell
   ----------------------------------------------------------------------------
   Below 1025px every row is a 2-column grid card. When a card has an odd
   number of half-width cells (e.g. the maintenance dashboard: Priority sits
   alone because Ticket + Reported are moved into the header), the empty grid
   slot shows the row's own plain white background, while the cells next to it
   carry the unread tint -> a white "hole" in the card.
   Giving the unread ROW the same tint as its cells fills that empty slot, so
   the card looks like one solid block. Colours match the td rules above.
   ========================================================================== */
@media (max-width: 1024px) {
  table.data-table tbody tr.is-unviewed { background: #dbe8ff; }
  table.data-table tbody tr.is-unviewed:hover { background: #c9dcff; }
  :root[data-theme="dark"] table.data-table tbody tr.is-unviewed { background: #1b3f7a; }
  :root[data-theme="dark"] table.data-table tbody tr.is-unviewed:hover { background: #234c92; }
}


/* CHANGED: the yellow dot is removed from the sidebar. Numbers (.nav-new) are the only indicator there. */
.sidebar nav a .nav-dot { display: none !important; }

/* ---- login notice v3: much more noticeable (amber = pending, red = new reports) ---- */
.login-notice { border-width: 2px; border-color: #f2a900; background: #fff1c2; color: #3d2900; animation: lnIn .35s ease both, lnGlowAmber 2.4s ease-in-out .6s infinite; }
.login-notice .ln-icon { background: #e08a00; color: #fff; box-shadow: 0 0 0 4px rgba(224,138,0,.22); }
.login-notice .ln-icon .icon-svg { animation: bellRing 1.1s ease .5s 3; transform-origin: 50% 0; }
.login-notice .ln-title strong { font-size: 14.5px; font-weight: 800; color: #5a3b00; }
.login-notice .ln-title .sub { color: #7a5200; font-weight: 600; }
.login-notice .ln-tile { background: #fff; border-width: 0; border-radius: 8px; box-shadow: none; }
.login-notice .ln-pend { background: #e08a00; border-left: 0; }
.login-notice .ln-pend b, .login-notice .ln-pend span { color: #fff; }
.login-notice .ln-new { background: #d4183d; border: 0; }
.login-notice .ln-new b, .login-notice .ln-new span { color: #fff; }
.login-notice .ln-new.ln-zero { background: rgba(0,0,0,.07); }
.login-notice .ln-new.ln-zero b, .login-notice .ln-new.ln-zero span { color: #6b5a3a; }
.login-notice .ln-tile b { font-size: 16px; }
.login-notice .ln-tile span { font-size: 11.5px; font-weight: 700; }

.login-notice.has-new { border-color: #d4183d; background: #ffd9e0; color: #5c0a1c; animation: lnIn .35s ease both, lnGlowRed 1.8s ease-in-out .6s infinite; }
.login-notice.has-new .ln-icon { background: #d4183d; box-shadow: 0 0 0 4px rgba(212,24,61,.22); }
.login-notice.has-new .ln-title strong { color: #8a0f29; }
.login-notice.has-new .ln-title .sub { color: #7a1a2d; }
@keyframes lnGlowAmber { 0%,100% { box-shadow: 0 0 0 0 rgba(242,169,0,.0); } 50% { box-shadow: 0 0 0 5px rgba(242,169,0,.28); } }
@keyframes lnGlowRed   { 0%,100% { box-shadow: 0 0 0 0 rgba(212,24,61,.0); } 50% { box-shadow: 0 0 0 5px rgba(212,24,61,.28); } }
@media (prefers-reduced-motion: reduce) { .login-notice, .login-notice.has-new { animation: none; } .login-notice .ln-icon .icon-svg { animation: none; } }

/* ---- login notice v4: New (red) and Pending (yellow) tiles = full colour, slightly see-through ---- */
.login-notice .ln-new  { background: rgba(212, 24, 61, .86);  border: 1.5px solid #d4183d; border-left-width: 1.5px; }
.login-notice .ln-pend { background: rgba(245, 166, 0, .88);  border: 1.5px solid #e08a00; border-left-width: 1.5px; }
.login-notice .ln-new b,  .login-notice .ln-new span  { color: #fff; }
.login-notice .ln-pend b, .login-notice .ln-pend span { color: #3d2600; }
.login-notice .ln-new.ln-zero { background: rgba(212, 24, 61, .16); border-color: rgba(212, 24, 61, .55); }
.login-notice .ln-new.ln-zero b, .login-notice .ln-new.ln-zero span { color: #9a1230; }

/* ---- login notice v5: neutral box + blue bell again (only the New / Pending tiles stay colourful) ---- */
.login-notice, .login-notice.has-new {
  background: var(--blue-50, #eef4ff); border: 1.5px solid var(--blue-200, #bcd3ff); color: var(--ink, #14213f);
  animation: lnIn .35s ease both;
}
.login-notice .ln-icon, .login-notice.has-new .ln-icon { background: var(--blue-600, #2457b8); color: #fff; box-shadow: 0 0 0 4px rgba(36, 87, 184, .16); }
.login-notice .ln-title strong, .login-notice.has-new .ln-title strong { color: var(--ink, #14213f); }
.login-notice .ln-title .sub, .login-notice.has-new .ln-title .sub { color: var(--text-secondary, #5b6985); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .login-notice, .login-notice.has-new { animation: none; } }

/* ---- login notice v6: also shown when there is no data (all clear) ---- */
.login-notice .ln-pend.ln-zero { background: rgba(245, 166, 0, .16); border-color: rgba(224, 138, 0, .55); }
.login-notice .ln-pend.ln-zero b, .login-notice .ln-pend.ln-zero span { color: #7a5200; }
.login-notice.is-clear .ln-icon { background: #1f9d55; box-shadow: 0 0 0 4px rgba(31, 157, 85, .18); }
.login-notice.is-clear .ln-icon .icon-svg { animation: none; }
/* CHANGED: the pop-up shows in the MIDDLE of the screen (one pop-up, one x). */
body .notif-popup-stack {
  top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important;
  transform: translate(-50%, -50%); width: min(420px, calc(100vw - 28px)) !important;
  max-height: none !important; overflow: visible !important; align-items: stretch;
}
body .notif-popup { animation-name: notifPopMid; }
body .notif-popup.leaving { transform: scale(.94); }
@keyframes notifPopMid { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
/* ---------- Notification dialog (centered, persistent) ---------- */
.nm-backdrop { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(7, 18, 40, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: nmFade .2s ease both; }
.nm-dialog { width: min(480px, 100%); max-height: min(640px, calc(100vh - 32px)); max-height: min(640px, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(7, 18, 40, .45);
  animation: nmPop .25s ease both; }
.nm-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--blue-700, #1d4592); color: #fff; }
.nm-head-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); }
.nm-head-icon svg { width: 18px; height: 18px; }
.nm-head-text { flex: 1; min-width: 0; }
.nm-title { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.nm-sub { font-size: .8rem; opacity: .85; margin-top: 2px; }
.nm-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; cursor: pointer; font-size: 22px; line-height: 1; color: #fff; background: rgba(255,255,255,.16); }
.nm-x:hover { background: rgba(255,255,255,.3); }
.nm-body { padding: 14px 16px; overflow-y: auto; display: grid; gap: 10px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.nm-label { font-size: .78rem; font-weight: 700; color: var(--muted, #6b7a99); }
.nm-card { border: 1px solid var(--border); border-left: 4px solid var(--blue-600, #2457b8); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.nm-card.urgent { border-left-color: #d4183d; }
.nm-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nm-card-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; color: var(--blue-600, #2457b8); }
.nm-card-icon .icon-svg, .nm-card-icon svg { width: 16px; height: 16px; }
.nm-card.urgent .nm-card-icon { color: #d4183d; }
.nm-chip { padding: 1px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; color: #fff; background: var(--blue-700, #1d4592); }
.nm-card.urgent .nm-chip { background: #d4183d; }
.nm-time { font-size: .74rem; color: var(--muted, #6b7a99); margin-left: auto; }
.nm-text { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: .92rem; line-height: 1.4; background: rgba(36,87,184,.07); overflow-wrap: anywhere; }
.nm-actions { margin-top: 10px; display: flex; gap: 8px; }
.nm-view { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 16px; border-radius: 8px; font-weight: 800; font-size: .85rem; text-decoration: none; color: #fff; background: var(--blue-700, #1d4592); }
.nm-view:hover { filter: brightness(1.12); }
.nm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); }
.nm-hint { font-size: .76rem; color: var(--muted, #6b7a99); }
.nm-close { flex: none; min-height: 34px; padding: 0 18px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--border); }
.nm-close:hover { background: rgba(36,87,184,.08); }
@keyframes nmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nmPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .nm-foot { flex-direction: column-reverse; align-items: stretch; } .nm-hint { text-align: center; } }
@media (prefers-reduced-motion: reduce) { .nm-backdrop, .nm-dialog { animation: none; } }
