/* Redesign 2026-10-15, second handover: notifications. Built from tokens.css; shared components live in ui.css. */

/* ── The bell ───────────────────────────────────────────────────────────────
   In the masthead a <details> (the dropdown, 64), in the phone's app bar a
   link. Outline bell, 44 × 44, the unread count in an orange-600 badge ringed
   in the masthead's navy so it reads on top of the bell's stroke. */
.nbell { position: relative; flex: 0 0 auto; display: flex; align-items: center; }
.nbell__trigger,
.nbell--bar {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--touch-target); height: var(--touch-target);
    border-radius: var(--radius-pill);
    color: var(--surface); cursor: pointer; list-style: none;
}
.nbell__trigger::-webkit-details-marker { display: none; }
.nbell__trigger::marker { content: ''; }
.nbell__trigger:hover { background: color-mix(in srgb, var(--surface) 8%, transparent); }
.nbell[open] > .nbell__trigger { background: color-mix(in srgb, var(--surface) 12%, transparent); }
.nbell__count {
    position: absolute; top: 4px; right: 4px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-pill);
    background: var(--orange-600); color: var(--surface);
    font: 800 12px/1 var(--font-sans);
    box-shadow: 0 0 0 2px var(--navy-900);
}

/* The page behind the open dropdown, dimmed as the design draws it. The
   masthead is its own stacking context, so while the bell is open it is lifted
   above the sticky bars below it (the account's phone heading, the lot's
   panel) or they would be drawn over the dropdown. */
body .masthead:has(.nbell[open]) { z-index: 100; }
.nbell__scrim { display: none; }
.nbell[open] > .nbell__scrim {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: color-mix(in srgb, var(--navy-900) 28%, transparent);
}

.nbell__panel {
    position: absolute; top: calc(100% + 14px); right: -8px; z-index: 91;
    width: 400px; max-width: calc(100vw - 2 * var(--space-4));
    background: var(--surface); color: var(--ink);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-hover), var(--shadow-float);
    overflow: hidden; text-align: left;
}
.nbell[open] > .nbell__panel { animation: nbell-in var(--duration-base) var(--ease-out); }
@keyframes nbell-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── The dropdown's content (fragment `_notifications_menu`) ────────────── */
.nmenu__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    min-height: 64px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--border);
}
.nmenu__head form { margin: 0; }
.nmenu__title { margin: 0; font: 600 16px/1.2 var(--font-sans); color: var(--ink); }
.nmenu__readall,
.nbar__readall {
    min-height: var(--touch-target); padding: 0 var(--space-2);
    border: 0; background: none; cursor: pointer;
    font: 800 13px/1 var(--font-sans); color: var(--blue-700);
}
.nmenu__readall:hover,
.nbar__readall:hover { text-decoration: underline; }
.nmenu__list { margin: 0; padding: 0; list-style: none; }
.nmenu__empty { margin: 0; padding: var(--space-6) var(--space-4); text-align: center; font: 500 14px/1.4 var(--font-sans); color: var(--muted); }
.nmenu .nmenu__all,
.nmenu .nmenu__all:visited,
.usernav .nmenu .nmenu__all {
    display: flex; width: 100%; align-items: center; justify-content: center;
    min-height: var(--touch-target);
    border-top: 1px solid var(--border);
    font: 800 13px/1 var(--font-sans); color: var(--blue-700);
}
.nmenu .nmenu__all:hover { text-decoration: underline; color: var(--blue-700); }

/* ── One row, on the page and in the dropdown ───────────────────────────── */
.nitem { border-top: 1px solid var(--border); }
.nitem:first-child { border-top: 0; }
.nitem__link,
.nitem__link:visited,
.usernav .nitem__link {
    display: flex; width: 100%; align-items: flex-start; gap: 14px;
    padding: 14px 18px;
    background: var(--surface); color: var(--ink);
    text-decoration: none;
}
.nitem__link:hover,
.usernav .nitem__link:hover { background: var(--ground); text-decoration: none; color: var(--ink); }
.usernav .nitem__link:visited { color: var(--ink); }
/* Unread: a wash of blue-100 at rest, the full tint on hover. */
.nitem--unread .nitem__link { background: color-mix(in srgb, var(--blue-100) 50%, var(--surface)); }
.nitem--unread .nitem__link:hover { background: var(--blue-100); }

.nitem__icon {
    flex: 0 0 auto; width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-pill);
}
.nitem__icon .accnav__icon { color: inherit; stroke: currentColor; }
.nitem__icon--warning { background: var(--amber-100); color: var(--amber-800); }
.nitem__icon--success { background: var(--green-100); color: var(--green-700); }
.nitem__icon--info    { background: var(--blue-100);  color: var(--blue-700); }
.nitem__icon--neutral { background: var(--ground);     color: var(--ink-2); }

.nitem__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nitem__title { font: 700 15px/1.35 var(--font-sans); color: var(--ink); }
.nitem--unread .nitem__title { font-weight: 800; }
.nitem__body { font: 500 13px/1.5 var(--font-sans); color: var(--ink-2); overflow-wrap: anywhere; }
.nitem__when { font: 500 12px/1.4 var(--font-sans); color: var(--muted); }
.nitem__dot {
    flex: 0 0 auto; width: 10px; height: 10px; margin-top: 6px;
    border-radius: var(--radius-pill); background: var(--orange-600);
}

.nitem--compact .nitem__link { gap: 12px; padding: 12px 16px; align-items: center; }
.nitem--compact .nitem__icon { width: 34px; height: 34px; }
.nitem--compact .nitem__title { font-size: 13px; }
.nitem--compact .nitem__dot { width: 8px; height: 8px; margin-top: 0; align-self: flex-start; margin-top: 6px; }

/* ── The page (63) ──────────────────────────────────────────────────────── */
.nbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
    margin: 0 0 14px;
}
.nbar__tabs { display: flex; gap: var(--space-2); }
.npill,
.npill:visited {
    display: inline-flex; align-items: center;
    min-height: var(--touch-target); padding: 0 14px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
    background: var(--surface); color: var(--ink-2);
    font: 800 13px/1 var(--font-sans); white-space: nowrap;
    transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.npill:hover { border-color: var(--blue-700); color: var(--ink); text-decoration: none; }
.npill.is-current,
.npill.is-current:visited,
.npill.is-current:hover { background: var(--blue-100) !important; border-color: var(--blue-700) !important; color: var(--blue-700) !important; }

.nbar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.nbar__actions form { margin: 0; }
.nbar__settings,
.nbar__settings:visited {
    display: inline-flex; align-items: center; min-height: var(--touch-target); padding: 0 var(--space-1);
    font: 700 14px/1 var(--font-sans); color: var(--blue-700);   /* a normal link (MOBILE-FIXES B12) */
}
.nbar__settings:hover { color: var(--blue-700); text-decoration: underline; }

.nlist {
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
    overflow: hidden;
}
.nlist__group {
    margin: 0; padding: 12px 18px 8px;
    background: var(--ground); border-top: 1px solid var(--border);
    font: 800 12px/1.2 var(--font-sans); letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted);
}
.nlist__group:first-child { border-top: 0; }
.nlist__items { margin: 0; padding: 0; list-style: none; }
.nlist__items .nitem:first-child { border-top: 1px solid var(--border); }
.nlist__empty { margin: 0; padding: 40px 18px; text-align: center; font: 500 15px/1.4 var(--font-sans); color: var(--muted); }

/* "Prikaži starije", below the fiftieth row. */
.nmore { display: flex; justify-content: center; margin: var(--space-4) 0 0; }

@media (max-width: 699px) {
    .nbar__actions { flex-wrap: wrap; justify-content: flex-end; }
    .nitem__link, .nitem__link:visited { padding: 14px var(--space-4); }
    .nlist__group { padding-left: var(--space-4); padding-right: var(--space-4); }
    /* On a phone the masthead wraps and scrolls away, so the dropdown is
       pinned to the screen, 16 px from both edges, over the dimmed page. */
    .nbell__panel { position: fixed; top: var(--space-4); left: var(--space-4); right: var(--space-4); width: auto; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .nbell[open] > .nbell__panel { animation: none; }
    .npill { transition: none; }
}
