/* Notifications (docs/NOTIFICATIONS.md): the bell, its list, the corner card and the window for urgent items.
 * Colours come from the theme tokens, so the light and the dark theme both read well. Sizes of figures follow number-system.css. */
.nb { position: relative; display: inline-flex; align-items: center; }
.nb__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--v3-line, var(--line)); border-radius: 12px; background: var(--v3-surface, var(--bg)); color: var(--v3-text, var(--text)); cursor: pointer; }
.nb__btn:hover { background: var(--v3-soft, var(--panel)); }
.nb__btn:focus-visible { outline: 2px solid var(--v3-blue, var(--primary)); outline-offset: 2px; }
.nb__badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--v3-blue, var(--primary)); color: #fff; font-size: 12px; line-height: 20px; font-weight: 700; text-align: center; box-sizing: border-box; }
.nb__badge[hidden] { display: none; }
.nb__btn.has-urgent .nb__badge { background: var(--v3-red, #d6001c); }

.nb__panel { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: min(480px, calc(100vw - 24px)); max-height: min(78vh, 680px); display: flex; flex-direction: column; border: 1px solid var(--v3-line, var(--line)); border-radius: 16px; background: var(--v3-surface, var(--bg)); color: var(--v3-text, var(--text)); box-shadow: 0 18px 50px rgba(15, 28, 56, .22); font-size: 14px; line-height: 20px; text-align: left; }
.nb__panel[hidden] { display: none; }
.nb__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 0; border-bottom: 1px solid var(--v3-line, var(--line)); }
.nb__tabs { display: flex; gap: 4px; }
.nb__tabs button { position: relative; height: auto; min-height: 0; margin: 0; padding: 8px 10px 12px; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; color: var(--v3-muted, var(--muted)); font: inherit; font-weight: 600; cursor: pointer; }
.nb__tabs button[aria-selected="true"] { color: var(--v3-text, var(--text)); }
/* the underline of the active tab is a line of its own, not a border: a border follows the rounded corners the buttons of the site have and curls up at the ends */
.nb__tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--v3-blue, var(--primary)); }
.nb__tabs button span { margin-left: 4px; color: var(--v3-blue, var(--primary)); }
.nb__head .nb-link { margin-bottom: 4px; }
.nb__list { overflow: auto; padding: 4px 14px 14px; }
.nb-empty { margin: 22px 0; text-align: center; color: var(--v3-muted, var(--muted)); }

button.nb-link { flex: none; height: auto; min-height: 0; margin: 0; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--v3-blue, var(--link)); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
button.nb-link:hover { background: transparent; text-decoration: underline; }
button.nb-link[hidden] { display: none; }
.nb-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 8px; }

.nb-card { padding: 14px 0; border-bottom: 1px solid var(--v3-line, var(--line)); }
.nb-card:last-child { border-bottom: 0; }
.nb-card--urgent { border-left: 3px solid var(--v3-red, #d6001c); padding-left: 12px; }
.nb-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.nb-card__when { color: var(--v3-muted, var(--muted)); font-size: 12px; }
.nb-card__text { margin: 6px 0; white-space: pre-line; overflow-wrap: anywhere; }
.nb-card__meta { margin: 2px 0 6px; color: var(--v3-muted, var(--muted)); font-size: 13px; }
.nb-card__meta--later { color: var(--v3-blue, var(--primary)); font-weight: 600; }
.nb-card__open { display: inline-block; margin-bottom: 8px; font-size: 13px; }
.nb-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.nb-card__actions .btn-sm, .nb-pop .btn-sm { margin: 0; }
.nb-card__more { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.nb-card__comment { display: block; width: 100%; min-height: 60px; margin: 8px 0 0; box-sizing: border-box; }
.nb-card__pop:empty { display: none; }
.nb-pop { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--v3-line, var(--line)); border-radius: 12px; background: var(--v3-soft, var(--panel)); }
.nb-pop__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.nb-pop__sep { color: var(--v3-muted, var(--muted)); font-size: 13px; }
.nb-pop__date, .nb-pop__time { height: 32px; margin: 0; padding: 0 8px; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--v3-line, var(--line)); border-radius: 8px; background: var(--v3-surface, var(--bg)); color: var(--v3-text, var(--text)); }
.nb-pop__date { width: 138px; }
.nb-pop__time { width: 74px; text-align: center; }
.nb-pop__custom { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--v3-line, var(--line)); }
.nb-pop__custom label { font-size: 13px; color: var(--v3-muted, var(--muted)); }
.nb-pop__custom input { max-width: 260px; }
.nb-pop__hint { margin: 0 0 8px; font-size: 13px; color: var(--v3-muted, var(--muted)); }
.nb-pop__people { display: grid; gap: 6px; max-height: 190px; overflow: auto; margin-bottom: 10px; }
.nb-person { display: flex; align-items: center; gap: 4px; }
.nb-error { margin: 8px 0 0; }

/* the corner card: quiet, closes itself, never covers the work */
.nb-toasts { position: fixed; z-index: 70; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.nb-toast { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border: 1px solid var(--v3-line, var(--line)); border-left: 3px solid var(--v3-blue, var(--primary)); border-radius: 14px; background: var(--v3-surface, var(--bg)); color: var(--v3-text, var(--text)); box-shadow: 0 12px 34px rgba(15, 28, 56, .2); font-size: 14px; line-height: 20px; }
.nb-toast__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.nb-toast__text { color: var(--v3-muted, var(--muted)); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.nb-toast__close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1.5px solid var(--v3-amber, #f0a000); border-radius: 8px; background: var(--v3-amber-bg, #fff4d6); color: var(--v3-text, var(--text)); font-size: 18px; line-height: 1; cursor: pointer; }   /* owner, 07.11.2026 (variant V): a yellow tile beside «Открыть», seen at once in both themes */
.nb-toast__close:hover { background: var(--v3-amber, #f0a000); color: #1a1400; }

/* the strip «Срочно» (owner, 21.10.2026): a red line under the menu, over the page; it does not cover anything and the page stays usable.
   «Открыть» unfolds the list of urgent items (the cards are the same as in the bell). Owner, 28.10.2026 (variant B): the list floats OVER the page like the
   menu of the bell - 560 px, under the button on the right, no dimming; the strip keeps its place and height, nothing under it moves.
   One urgent item: its buttons «Прочитано» and «Отложить ▾» sit in the strip, there is no «Показать все». Several: «ещё N» beside the first one. */
/* exact figures of the chosen variant A (owner, 21.10.2026): the tint and the line are tokens of design-v3.css, text 14/20, the bar 10 + 32 + 10 px */
.urgent-strip { position: relative; z-index: 55; margin: 12px 0 0; background: var(--v3-red-bg, #fdecee); border-top: 1px solid var(--v3-red-line, #f3c3c9); border-bottom: 1px solid var(--v3-red-line, #f3c3c9); color: var(--v3-text, var(--text)); font-size: 14px; line-height: 20px; }
.urgent-strip[hidden] { display: none; }
.urgent-strip__in { position: relative; max-width: 1560px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.urgent-strip__bar { display: flex; align-items: center; gap: 8px 12px; min-height: 0; padding: 12px 0; }
.urgent-strip__label { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--v3-red, #d6001c); font-weight: 700; }
.urgent-strip__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* the word is read by screen readers; the sign «!» shows it (variant A) */
.urgent-strip__text b { font-weight: 700; }
.urgent-strip__label::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--v3-red, #d6001c); color: var(--v3-surface, #fff); font-size: 12px; line-height: 20px; }   /* the «!» is the colour of the surface: white on the red of the light theme, #212121 on the pink of the dark one */
.urgent-strip__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-strip__text--big { font-size: 18px; line-height: 24px; font-weight: 600; color: var(--v3-red, #d6001c); }
.urgent-strip__deadline { color: var(--v3-red, #d6001c); font-weight: 700; }
.urgent-strip__more { flex: none; color: var(--v3-red, #d6001c); font-weight: 600; white-space: nowrap; }
.urgent-strip__acts { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.urgent-strip__acts .btn-sm { margin: 0; }
.urgent-strip :is(.urgent-strip__more, .urgent-strip__acts)[hidden] { display: none !important; }
.urgent-strip .important-notices__list {
  position: absolute; top: calc(100% + 8px); right: 32px; width: min(560px, calc(100vw - 32px)); max-height: min(60vh, 560px); overflow: auto; overscroll-behavior: contain; box-sizing: border-box;
  padding: 4px 18px 6px; border: 1px solid var(--v3-line, var(--line)); border-radius: 16px; background: var(--v3-surface, var(--bg)); box-shadow: 0 18px 50px rgba(15, 28, 56, .22);
}
.urgent-strip .important-notices__list[hidden] { display: none; }
.urgent-strip .nb-card--urgent { border-left: 0; padding-left: 0; }
/* a card in the floating list: title and date, text, then the buttons and «Открыть раздел →» in one line (the order puts the link after the buttons) */
.urgent-strip .nb-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; padding: 12px 0; }
.urgent-strip .nb-card > * { flex: 0 0 100%; order: 0; }
.urgent-strip .nb-card__head { align-items: baseline; }
.urgent-strip .nb-card__text { margin: 4px 0 0; }
.urgent-strip .nb-card__actions { flex: 0 1 auto; order: 1; margin: 10px 0 0; }
.urgent-strip .nb-card__open { flex: 0 1 auto; order: 2; margin: 10px 0 0 auto; }
.urgent-strip .nb-card__more { order: 3; }
.urgent-strip .nb-card__pop { order: 4; }
.urgent-strip .nb-card > .nb-pop:first-child { margin-top: 0; }
@media (max-width: 760px) {
  .urgent-strip__in { padding: 0 16px; }
  .urgent-strip__bar { flex-wrap: wrap; align-items: center; }
  .urgent-strip__text { flex: 1 1 100%; order: 3; white-space: normal; }
  .urgent-strip__more, .urgent-strip__acts { margin-left: auto; }
  .urgent-strip .important-notices__list { left: 12px; right: 12px; width: auto; padding: 4px 14px 6px; }
}

@media (max-width: 760px) {
  .nb__panel { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
}

/* the scrolling list of the window must not get a frame when the window opens (it was the unexplained blue square): the page-wide
   :focus-visible rule of the design is stronger than a plain class, so this one repeats its prefix */
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.important-notices__list, .nb__list, .nb__panel):focus-visible,
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.important-notices__list, .nb__list, .nb__panel):focus { outline: none; }

.nb__foot { padding: 10px 14px; border-top: 1px solid var(--v3-line, var(--line)); font-size: 13px; }
.nb__foot a[hidden] { display: none; }

/* the snooze menu and «+ Исполнитель» of the notes page (the same choices as in the bell) */
.note-snooze { position: relative; display: inline-block; }
.note-snooze > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.note-snooze > summary::-webkit-details-marker { display: none; }
.note-snooze__pop { position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); display: grid; gap: 8px; width: 280px; padding: 12px; border: 1px solid var(--v3-line, var(--line)); border-radius: 12px; background: var(--v3-surface, var(--bg)); box-shadow: 0 12px 30px rgba(15, 28, 56, .18); }
.note-snooze__when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.note-snooze__when input { height: 32px; margin: 0; padding: 0 8px; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--v3-line, var(--line)); border-radius: 8px; background: var(--v3-surface, var(--bg)); color: var(--v3-text, var(--text)); }
.note-snooze__when input[type=date] { width: 138px; }
.note-snooze__when input[type=time] { width: 74px; text-align: center; }
.note-snooze__pop label { display: grid; gap: 4px; font-size: 13px; color: var(--v3-muted, var(--muted)); }
.note-snooze__pop .btn-sm { margin: 0; }

/* the settings table */
.notice-matrix { width: 100%; }
.notice-matrix th, .notice-matrix td { vertical-align: middle; }
.notice-matrix__section th { background: var(--v3-soft, var(--panel)); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--v3-muted, var(--muted)); }
.notice-matrix__select { min-width: 150px; }
.notice-matrix__select--off { color: var(--v3-muted, var(--muted)); }
.notice-matrix__select--urgent { color: var(--v3-red, #d6001c); font-weight: 600; }

/* Editable permission/notification matrices retain fixed row/column identities. */
.tablewrap.matrix-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
.tablewrap table.halo-matrix { --matrix-label-width:280px; width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; }
.tablewrap table.halo-matrix tr:not(.notice-matrix__section):not(.beta-matrix__group) > :first-child {
  position:sticky; left:0; z-index:2; width:var(--matrix-label-width); min-width:var(--matrix-label-width); max-width:var(--matrix-label-width);
  white-space:normal; overflow-wrap:anywhere; background:var(--surface); box-shadow:2px 0 0 var(--line); text-align:left;
}
html.look-flat.look-accent body.v2.v3[data-marketplace] .tablewrap table.halo-matrix tr.v3-table-heading > :first-child { z-index:12!important; background:var(--v3-band,var(--panel)); }
.tablewrap table.halo-matrix tr:not(.notice-matrix__section):not(.beta-matrix__group) > :not(:first-child) { min-width:150px; }
.halo-matrix .matrix-section-title { position:sticky; left:10px; display:inline-block; max-width:var(--matrix-label-width); white-space:normal; }
@media (max-width:640px) {
  .tablewrap table.halo-matrix { --matrix-label-width:clamp(148px,42vw,190px); }
}

/* «Заметки» in the header, next to the theme switch (owner, 2026-10-13) */
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-notes { display: inline-flex; gap: 8px; align-items: center; justify-content: center; height: 40px; padding: 8px 14px; margin-left: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; flex-shrink: 0; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-notes:hover, html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-notes.is-active { border-color: var(--primary); color: var(--primary); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-notes + .v3-theme { margin-left: 10px; }
@media (max-width: 760px) { .v3-notes span { display: none; } .v3-notes { padding: 8px 10px !important; } }

/* the three buttons of the header - «Заметки», the bell and the theme switch - have one height, one frame and one gap (owner, 2026-10-13: symmetry) */
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb { margin-left: 10px; flex-shrink: 0; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb__btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb__btn:hover { border-color: var(--primary); color: var(--primary); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb + .v3-theme { margin-left: 10px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .v3-notes + .nb + .v3-theme { margin-left: 10px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb__panel { top: calc(100% + 12px); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar :is(.v3-notes, .nb, .nb__btn, .v3-theme) { margin-top: 0; margin-bottom: 0; align-self: center; }
@media (max-width: 760px) {
  html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .v3-theme { min-width: 0; padding: 8px; gap: 6px; }
  html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb, html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .nb + .v3-theme { margin-left: 6px; }
  html.look-flat.look-accent body.v2.v3[data-marketplace] .topbar .v3-notes { margin-left: auto; }
}
