/* Стеження, призначення, сповіщення (трек I). Токени з app.css. Без градієнтів, свічення, емодзі й іконок-прикрас:
   «нове» = слово + жирний край, а не лише колір. */

/* лічильник у шапці */
.notif { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); text-decoration: none; padding: 4px 8px; border-radius: var(--radius); }
.notif:hover { background: var(--raised); color: var(--ink); }
.notif-n { display: inline-block; min-width: 1.5em; padding: 0 .4em; text-align: center; font: 700 .8rem var(--mono); color: var(--accent-ink); background: var(--accent); border-radius: 3px; }
.notif-n[hidden] { display: none; }

/* панель стеження на «Огляді» */
.wpanel { margin-bottom: 24px; max-width: 880px; }
.wmsg { margin: 0 0 12px; }
.wsince { padding: 9px 14px; background: var(--card); border: 1px solid var(--hair2); border-inline-start: 4px solid var(--accent); border-radius: var(--radius); margin: 0 0 14px; max-width: 70ch; }
.wsince-none { border-inline-start-color: var(--hair2); color: var(--muted); }
.wadd { margin: 0 0 8px; max-width: 640px; }
.wadd label { display: block; font-weight: 600; margin-bottom: 4px; }
.wadd-row { display: flex; gap: 8px; }
.wadd-row input { flex: 1; min-width: 0; font: inherit; padding: 9px 11px; background: var(--field); border: 1px solid var(--ctl); border-radius: var(--radius); color: var(--ink); }
.wstatus { margin: 0 0 12px; color: var(--ink2); font-size: .95rem; max-width: 75ch; }
.wstatus-bad { padding: 8px 12px; background: var(--md-bg); color: var(--md-tx); border: 1px solid var(--md-tx); border-radius: var(--radius); }
.wpublic { max-width: 75ch; margin: 6px 0 14px; }
.wsubs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.wsubs li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--hair); }
.wsubs li:first-child { border-top: 0; }
.wsubs-kind { font-size: .85rem; font-weight: 600; color: var(--muted); min-width: 5.5em; }
.wscope { margin-top: 8px; }
.wsubs-box { margin: 0 0 14px; }
.wsubs-box summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
.wsubs-box .wsubs { margin: 6px 0 0; }
/* картка закупівлі: статус · номер · дата, назва (до 3 рядків), мета, панель дій. Без таблиці з фіксованими ширинами. */
.tcards { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 14px; }
.tcard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 24px; padding: 16px 18px 14px; background: var(--card); border: 1px solid var(--hair2); border-radius: 10px; }
.tcard:hover { border-color: var(--ctl); }
.tcard-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-width: 0; }
.tcard-ref { display: inline-flex; align-items: center; gap: 2px; color: var(--ink2); min-width: 0; }
.tcard-ref .mono { font-size: .88rem; overflow-wrap: anywhere; user-select: all; }
.tcard-copy { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: var(--ink2); background: transparent; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; }
.tcard-copy:hover { color: var(--accent); background: var(--raised); border-color: var(--hair2); }
.tcard-copy.is-copied { color: var(--ok-tx); background: var(--ok-bg); border-color: var(--ok-tx); }
.tcard-when { color: var(--muted); font-size: .9rem; }
.tcard-mod { display: none; }
.tcard-when .ic { margin-right: 6px; }
.tcard-title { margin: 0; font: 600 1.08rem/1.4 var(--sans); }
.tcard-title a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: break-word; }
.tcard-title a:hover { color: var(--accent); text-decoration: underline; }
.tcard-entity { margin: -4px 0 0; color: var(--muted); font-size: .9rem; }
.tcard-err { margin: 0; font-size: .9rem; font-weight: 600; }
.tcard-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; min-width: 0; }
.tcard-meta > div { min-width: 0; }
.tcard-meta dt { font-size: .82rem; font-weight: 600; color: var(--muted); }
.tcard-meta dd { margin: 1px 0 0; color: var(--ink); }
.tcard-amount { font: 600 1.05rem var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcard-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--hair); }
.tcard-acts .wact { display: contents; }
@media (min-width: 1100px) {
  .tcard { grid-template-columns: minmax(0, 1fr) 16rem; grid-template-rows: auto auto 1fr auto; grid-template-areas: "top meta" "title meta" "entity meta" "acts acts"; align-items: start; }
  .tcard-top { grid-area: top; } .tcard-title { grid-area: title; } .tcard-entity { grid-area: entity; } .tcard-err { grid-area: entity; }
  .tcard-meta { grid-area: meta; flex-direction: column; gap: 12px; padding-inline-start: 20px; border-inline-start: 1px solid var(--hair); }
  .tcard-acts { grid-area: acts; }
  .tcard-when { display: none; } .tcard-mod { display: block; }
}
.tcard-who dd { overflow-wrap: anywhere; }

/* кнопки дій: .btn з app.css; «стежити» як перемикач, «призначити» як меню-кнопка */
.wact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wact-page { margin: 0 0 24px; }
.wtag { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; font-size: .92rem; color: var(--lw-tx); background: var(--lw-bg); border: 1px solid var(--lw-tx); border-radius: var(--radius); }
.wpick { position: relative; }
.wpick > summary { list-style: none; user-select: none; }
.wpick > summary::-webkit-details-marker { display: none; }
.wpick-caret { margin-left: 6px; margin-right: -4px; transition: transform .15s; }
.wpick[open] > summary { background: var(--raised); border-color: var(--accent); color: var(--accent); }
.wpick[open] .wpick-caret { transform: rotate(180deg); }
.wpick-form { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: grid; gap: 8px; width: 19rem; max-width: calc(100vw - 32px); padding: 12px; background: var(--card); border: 1px solid var(--hair2); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.wpick-form label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.wpick-form select { font: inherit; font-size: .94rem; min-height: 36px; padding: 4px 8px; width: 100%; }
.wwho { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wwho-item { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.wwho-name { overflow-wrap: anywhere; }
.werr { color: var(--md-tx); }

/* стрічка сповіщень */
.wgroups { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.wgroup { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 14px 18px; }
.wgroup-h h2 { font-size: 1.1rem; margin: 0 0 2px; }
.wgroup-h h2 a { color: var(--ink); text-decoration: none; }
.wgroup-h h2 a:hover { color: var(--accent); text-decoration: underline; }
.wgroup-h p { margin: 0 0 2px; }
.wgroup-meta, .wgroup-who { color: var(--muted); font-size: .92rem; }
.wgroup-links { display: flex; flex-wrap: wrap; gap: 8px; }
.wentries { list-style: none; margin: 10px 0 0; padding: 0; }
.wentry { display: grid; grid-template-columns: 6.2em 9.5em 7em minmax(0, 1fr); gap: 4px 12px; padding: 8px 0 8px 10px; border-top: 1px solid var(--hair); border-inline-start: 4px solid transparent; align-items: baseline; }
.wentry.is-unread { border-inline-start-color: var(--accent); background: var(--ui); }
.wtender .wentry { grid-template-columns: 9.5em minmax(0, 1fr); }
.wtext { min-width: 0; overflow-wrap: anywhere; }
.wstate { font-size: .85rem; font-weight: 600; color: var(--muted); }
.wstate-new { color: var(--accent); }
.wwhen { font: .9rem var(--mono); color: var(--ink2); white-space: nowrap; }
.wsrc { font-size: .85rem; color: var(--muted); }
.wlabel { font-weight: 600; }
.wold { color: var(--muted); text-decoration: line-through; }
.wnewv { color: var(--ink); }

/* закупівля у стеженні */
.wbid { max-width: 560px; }
.wbid textarea { width: 100%; font: inherit; padding: 9px 11px; background: var(--field); border: 1px solid var(--ctl); border-radius: var(--radius); color: var(--ink); resize: vertical; }
.wbid select, .wbid input[type="date"] { font: inherit; padding: 9px 11px; background: var(--field); border: 1px solid var(--ctl); border-radius: var(--radius); color: var(--ink); }
.wtender h2 { margin-top: 28px; }
.wlimit { max-width: 560px; margin-bottom: 12px; padding: 8px 12px; background: var(--md-bg); color: var(--md-tx); border: 1px solid var(--md-tx); border-radius: var(--radius); }

/* налаштування сповіщень */
.wfield { border: 0; padding: 0; margin: 0 0 8px; }
.wfield legend { font-weight: 700; padding: 0; margin-bottom: 4px; font-family: var(--serif); font-size: 1.15rem; }
.wradio { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.wradio input { width: 1.1em; height: 1.1em; }

@media (max-width: 720px) {
  .wentry, .wtender .wentry { grid-template-columns: 1fr; }
  .wadd-row { flex-direction: column; }
  .wadd-row input, .wadd-row button { min-height: 44px; }
  .wsubs-box summary { display: flex; align-items: center; min-height: 44px; }
  .tcard { padding: 14px 14px 12px; }
  .tcard-copy { width: 44px; height: 44px; }
  .tcard-acts .btn, .tcard-acts .inline .btn { min-height: 40px; }
  .wpick[open] { flex: 1 1 100%; }
  .wpick-form { position: static; width: auto; max-width: none; margin-top: 6px; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .wpick-caret { transition: none; } }

/* Сповіщення: кнопка «Позначити прочитаними» з поясненням, повідомлення про результат, порожні стани */
.wfeed .quick { align-items: flex-start; }
.wread { display: grid; gap: 4px; justify-items: start; }
.wread .btn[disabled] { cursor: not-allowed; }
.wread-hint { margin: 0; max-width: 28ch; }
.wnotice { margin: 0 0 14px; }
.wnotice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wempty-act { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 18px; }
.stab b { min-width: 1.4ch; text-align: center; }
@media (max-width: 560px) {
  .wread, .wread .btn { width: 100%; }
  .wread-hint { max-width: none; }
  .wempty-act .btn { flex: 1 1 100%; justify-content: center; min-height: 44px; }
}

/* Дії в картці закупівлі: десктоп бачить усе в рядку (.tc-desk), телефон (<720 px) лише головну дію і «Ще дії» (.tc-more) */
.tc-rows { display: contents; }
.tc-more { display: none; }
.tc-more > summary { list-style: none; user-select: none; cursor: pointer; }
.tc-more > summary::-webkit-details-marker { display: none; }
.tc-more[open] > summary { background: var(--raised); border-color: var(--accent); color: var(--accent); }
.tc-more[open] .wpick-caret { transform: rotate(180deg); }
.tc-more-body { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; width: 100%; }
.tc-more-body .wact { display: contents; }
@media (max-width: 719px) {
  .tcard-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tcard-acts > .btn-primary { justify-content: center; min-height: 44px; }
  .tc-desk { display: none; }
  .tc-more { display: block; }
  .tc-more > summary { display: flex; justify-content: center; min-height: 44px; }
  .tc-more[open] { grid-column: 1 / -1; order: 3; }
  .tc-more-body { flex-direction: column; align-items: stretch; }
  .tc-more-body .btn, .tc-more-body .inline, .tc-more-body .inline .btn { width: 100%; justify-content: flex-start; min-height: 44px; }
  .tc-more-body .wpick[open] { flex: none; }
}
.tc-more-body .wtag { white-space: normal; max-width: 100%; }
@media (max-width: 719px) { .tc-more { min-width: 0; } }
