/* ============================================================
   Tender Radar — dashboard (app.html)
   Světlé produktové rozhraní (Soft Mist), hustší než landing.
   ============================================================ */

.app { background: var(--mist); }

/* ===== App bar ===== */
.appbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner { display: flex; align-items: center; gap: 20px; max-width: 1400px; margin-inline: auto; padding: 0 22px; height: 62px; }
.appbar .brand-name { font-size: 1.1rem; }
.appbar-run { display: flex; align-items: center; gap: 9px; margin-left: 8px; font-size: .86rem; color: var(--slate); }
.appbar-run b { color: var(--navy); font-weight: 600; }
.run-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(29,158,117,.16); flex: none; }
.run-sep { color: var(--line-2); }
.appbar-actions { margin-left: auto; display: flex; gap: 10px; }

/* ===== Statistiky ===== */
.statbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.statbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; max-width: 1400px; margin-inline: auto; }
.scard { padding: 18px 22px; display: flex; flex-direction: column; gap: 5px; position: relative; }
.scard + .scard::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.scard-num { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--navy); line-height: 1; letter-spacing: -0.02em; }
.scard:nth-child(2) .scard-num { color: var(--azure); }
.scard:nth-child(3) .scard-num { color: var(--warn); }
.scard-label { font-size: .82rem; color: var(--slate); }

/* ===== Workspace ===== */
.workspace { display: grid; grid-template-columns: 300px 1fr; gap: 24px; max-width: 1400px; margin-inline: auto; padding: 24px 22px 64px; align-items: start; }

/* ===== Filtry ===== */
.filters {
  position: sticky; top: 78px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); display: grid; gap: 20px;
  /* panel je delší než okno (44 oborů, uložené filtry) -> scroluje sám uvnitř sticky.
     POZOR: žádné overscroll-behavior:contain — po dojetí vnitřního scrollu se musí
     kolečko předat stránce, aby se panel přišpendlil (top 78px) a byl vidět celý. */
  max-height: calc(100vh - 78px - 20px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.filters-head { display: flex; align-items: baseline; justify-content: space-between; }
.filters-head h2 { font-size: 1.05rem; }
.linkbtn { background: none; border: 0; color: var(--blue); font-weight: 600; font-size: .86rem; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.linkbtn:hover { text-decoration: underline; }
.fgroup { display: grid; gap: 10px; }
.flabel { font-size: .82rem; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
.flabel b { font-family: var(--font-mono); color: var(--blue); }

.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--slate-soft); pointer-events: none; }
.search input {
  width: 100%; font-family: var(--font-sans); font-size: .92rem; color: var(--ink);
  background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px 10px 36px; transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.search input::placeholder { color: var(--slate-soft); }
.search input:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 4px rgba(61,123,255,.14); }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px; }
.segmented button { font-family: var(--font-sans); font-weight: 600; font-size: .84rem; color: var(--slate); background: transparent; border: 0; border-radius: 7px; padding: 7px 4px; cursor: pointer; transition: background-color .16s, color .16s, box-shadow .16s; }
.segmented button:hover { color: var(--navy); }
.segmented button.on { background: var(--surface); color: var(--navy); box-shadow: var(--shadow-sm); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: var(--pill); background: linear-gradient(90deg, var(--blue) var(--fill,0%), var(--line-2) var(--fill,0%)); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); box-shadow: var(--shadow-sm); transition: transform .12s var(--e-out); }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.range-legend { display: flex; justify-content: space-between; font-size: .72rem; color: var(--slate-soft); font-family: var(--font-mono); }

.chipset { display: flex; flex-wrap: wrap; gap: 7px; }
.chipset button { font-family: var(--font-sans); font-size: .78rem; font-weight: 500; color: var(--slate); background: var(--mist); border: 1px solid var(--line); border-radius: var(--pill); padding: 6px 11px; cursor: pointer; transition: all .16s; }
.chipset button:hover { border-color: var(--blue); color: var(--navy); }
.chipset button.on { background: var(--rel-mid-bg); border-color: var(--blue); color: var(--blue); }

.toggles { gap: 13px; }
.switch { display: flex; align-items: center; gap: 11px; font-size: .87rem; color: var(--ink); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui { flex: none; width: 38px; height: 22px; border-radius: var(--pill); background: var(--line-2); position: relative; transition: background-color .2s var(--e-out); }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--e-out); }
.switch input:checked + .switch-ui { background: var(--blue); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--blue); outline-offset: 2px; }

.saved { gap: 8px; }
.saved-list { display: flex; flex-direction: column; gap: 6px; }
.saved-empty { font-size: .8rem; color: var(--slate); line-height: 1.4; margin: 2px 0 0; }
/* jedna položka = použít (velké tlačítko) + smazat (×) */
.saved-item { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--mist); overflow: hidden; transition: border-color .16s, background .16s; }
.saved-item:hover { border-color: var(--blue); background: var(--rel-mid-bg); }
.saved-apply { flex: 1; text-align: left; font-family: var(--font-sans); font-size: .86rem; font-weight: 500; color: var(--navy); background: none; border: 0; padding: 10px 12px; cursor: pointer; }
.saved-apply:hover { color: var(--blue); }
.saved-del { flex: none; display: grid; place-items: center; width: 34px; background: none; border: 0; border-left: 1px solid var(--line); color: var(--slate); cursor: pointer; transition: color .16s, background .16s; }
.saved-del svg { width: 15px; height: 15px; }
.saved-del:hover { color: #C0392B; background: rgba(192,57,43,.08); }
.saved-item.just-applied { border-color: var(--blue); background: var(--rel-mid-bg); animation: savedFlash .6s ease; }
@keyframes savedFlash { 0% { box-shadow: 0 0 0 0 rgba(61,123,255,.35); } 100% { box-shadow: 0 0 0 6px rgba(61,123,255,0); } }
/* přidat filtr */
.saved-add { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 2px; font-family: var(--font-sans); font-size: .84rem; font-weight: 600; color: var(--blue); background: none; border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; transition: all .16s; }
.saved-add svg { width: 15px; height: 15px; }
.saved-add:hover { border-color: var(--blue); background: var(--rel-mid-bg); }
.saved-add-row { display: flex; align-items: center; gap: 6px; }
.saved-add-row input { flex: 1; min-width: 0; font-family: var(--font-sans); font-size: .84rem; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
.saved-add-row input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--rel-mid-bg); }
.saved-cancel { flex: none; width: 32px; height: 32px; }
.saved-cancel svg { width: 15px; height: 15px; }
/* atribut hidden musí přebít display z tříd výše (stejná specificita, ale pozdější pravidlo) */
.saved-add[hidden], .saved-add-row[hidden] { display: none; }

/* rozbalení všech oborů (CPV divizí) */
.cpv-more { margin-top: 6px; align-self: flex-start; }
.cpv-more[hidden] { display: none; }

/* ===== Feed ===== */
/* min. výška: i s pár výsledky musí mít stránka kam scrollovat, aby se panel
   filtrů přišpendlil (top 78px) a šel doscrollovat celý */
.feed { min-height: calc(100vh - 40px); }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.feed-count { font-size: .95rem; color: var(--slate); }
.feed-count b { color: var(--navy); font-weight: 700; font-size: 1.05rem; }
.feed-hidden { color: var(--slate-soft); font-size: .84rem; }
.sortsel { display: flex; align-items: center; gap: 9px; font-size: .87rem; color: var(--slate); }
.sortsel select { font-family: var(--font-sans); font-size: .88rem; color: var(--navy); font-weight: 500; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; }
.sortsel select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(61,123,255,.14); }

.feed-list { list-style: none; display: grid; gap: 12px; }
.tender {
  display: grid; grid-template-columns: 62px 1fr 20px; gap: 18px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px;
  box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; width: 100%; font-family: inherit;
  transition: transform .2s var(--e-out), border-color .2s, box-shadow .2s;
}
.tender:hover { transform: translateY(-2px); border-color: rgba(61,123,255,.34); box-shadow: var(--shadow-md); }
.tender:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tender.is-below { opacity: .74; }

/* skóre prstenec (--band = barva prstence/výplně, --ink = barva čísla s AA kontrastem) */
.t-score { --band: var(--rel-low); --ink: var(--rel-low-ink); position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--band) calc(var(--score,0) * 3.6deg), var(--line) 0); }
.t-score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.t-score span { position: relative; font-family: var(--font-mono); font-weight: 600; font-size: 1.18rem; color: var(--ink); }
.t-score[data-band="high"] { --band: var(--rel-high); --ink: var(--rel-high-ink); }
.t-score[data-band="mid"]  { --band: var(--rel-mid);  --ink: var(--rel-mid-ink); }
.t-score[data-band="low"]  { --band: var(--rel-low);  --ink: var(--rel-low-ink); }

.t-main { min-width: 0; display: block; }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.t-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--navy); line-height: 1.28; letter-spacing: -0.01em; margin-bottom: 7px; }
.t-sub { display: block; font-size: .88rem; color: var(--slate); margin-bottom: 9px; }
.t-sub b { color: var(--navy); font-weight: 600; }
.t-reason { display: -webkit-box; font-size: .9rem; color: var(--slate); line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-chev { align-self: center; color: var(--slate-soft); }
.t-chev svg { width: 18px; height: 18px; }

.badge-dupe { font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--violet); background: rgba(106,63,245,.1); border: 1px solid rgba(106,63,245,.2); padding: 3px 8px; border-radius: var(--pill); }
.t-src { font-weight: 600; color: var(--blue-ink); background: var(--rel-mid-bg); border-color: rgba(61,123,255,.22); }
.flabel-hint { color: var(--slate-soft); font-weight: 500; font-size: .78rem; }

/* Odvozený stav sledování */
.t-status { font-size: .7rem; font-weight: 700; letter-spacing: .01em; padding: 3px 9px; border-radius: var(--pill); border: 1px solid transparent; }
.t-status[data-ws="open"]      { color: var(--ok);        background: rgba(29,158,117,.12);  border-color: rgba(29,158,117,.24); }
.t-status[data-ws="past"]      { color: var(--slate-soft); background: rgba(124,136,180,.14); border-color: rgba(124,136,180,.24); }
.t-status[data-ws="awarded"]   { color: var(--slate);     background: var(--mist);           border-color: var(--line); }
.t-status[data-ws="cancelled"] { color: var(--risk);      background: rgba(192,64,46,.08);   border-color: rgba(192,64,46,.2); }
.t-status[data-ws="active"]    { color: var(--blue-ink);  background: var(--rel-mid-bg);     border-color: rgba(61,123,255,.2); }
.t-status[data-ws="planned"]   { color: var(--violet);    background: rgba(106,63,245,.08);  border-color: rgba(106,63,245,.2); }
.t-deadline { font-size: .76rem; font-weight: 600; color: var(--slate); display: inline-flex; align-items: center; gap: 5px; }
.t-deadline.warn { color: var(--warn-ink); }
.t-deadline.risk { color: var(--risk); }
.t-deadline.past { color: var(--slate-soft); }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty img { margin: 0 auto 12px; opacity: .9; }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--slate); max-width: 42ch; margin: 0 auto 18px; }

/* ===== Detail drawer ===== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(9,20,60,.42); z-index: var(--z-overlay); opacity: 0; transition: opacity .3s var(--e-out); }
.drawer-overlay.show { opacity: 1; }
/* Zavřený stav = atribut hidden (display:none) → mimo tab-order i bez overflow. */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: var(--z-drawer);
  background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(100%);
  transition: transform .34s var(--e-out); overflow-y: auto; overscroll-behavior: contain;
}
.drawer.show { transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-overlay { transition: none; } }
.drawer-inner { padding: 26px 28px 40px; }

.dh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dh-score { --band: var(--rel-low); --ink: var(--rel-low-ink); position: relative; width: 78px; height: 78px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--band) calc(var(--score,0) * 3.6deg), var(--line) 0); }
.dh-score::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.dh-score b { position: relative; font-family: var(--font-mono); font-weight: 600; font-size: 1.5rem; color: var(--ink); }
.dh-score small { position: relative; font-size: .58rem; color: var(--slate-soft); margin-top: -2px; }
.dh-score[data-band="high"] { --band: var(--rel-high); --ink: var(--rel-high-ink); }
.dh-score[data-band="mid"]  { --band: var(--rel-mid);  --ink: var(--rel-mid-ink); }
.dh-score[data-band="low"]  { --band: var(--rel-low);  --ink: var(--rel-low-ink); }
.iconbtn { background: var(--mist); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--slate); cursor: pointer; transition: all .16s; flex: none; }
.iconbtn:hover { color: var(--navy); border-color: var(--line-2); }
.iconbtn svg { width: 18px; height: 18px; }

.d-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.d-title { font-size: 1.4rem; line-height: 1.22; margin-bottom: 16px; }
.d-band { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: var(--pill); }
.d-band[data-band="high"] { color: var(--rel-high-ink); background: var(--rel-high-bg); }
.d-band[data-band="mid"]  { color: var(--rel-mid-ink);  background: var(--rel-mid-bg); }
.d-band[data-band="low"]  { color: var(--rel-low-ink);  background: var(--rel-low-bg); }

.d-block { margin-top: 22px; }
.d-block h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--slate); font-family: var(--font-sans); font-weight: 700; margin-bottom: 10px; }
.reason-box { background: var(--grad-soft); border: 1px solid rgba(61,123,255,.18); border-radius: var(--r-sm); padding: 15px 16px; }
.reason-box p { font-size: .95rem; color: var(--ink); line-height: 1.55; }
.reason-nodi { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.reason-nodi img { width: 22px; height: 22px; }

.sum-list { list-style: none; display: grid; gap: 9px; }
.sum-list li { position: relative; padding-left: 22px; font-size: .95rem; color: var(--ink); line-height: 1.5; }
.sum-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); }

.d-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.d-fact { background: var(--surface); padding: 12px 14px; }
.d-fact dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-soft); margin-bottom: 4px; }
.d-fact dd { font-size: .95rem; color: var(--navy); font-weight: 500; }
.d-fact dd.mono { font-family: var(--font-mono); font-weight: 600; }

.doc-list { list-style: none; display: grid; gap: 8px; }
.doc-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .9rem; color: var(--navy); }
.doc-item svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.doc-item .doc-mime { margin-left: auto; font-size: .72rem; color: var(--slate-soft); text-transform: uppercase; }
.doc-empty { font-size: .88rem; color: var(--slate-soft); font-style: italic; }

/* Ask Nodi (RAG stub) */
.nodi-panel { background: var(--navy); border-radius: var(--r); padding: 18px; color: var(--d-ink); }
.nodi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.nodi-head img { width: 30px; height: 30px; }
.nodi-head b { font-family: var(--font-display); color: #fff; font-weight: 600; }
.nodi-head span { font-size: .74rem; color: var(--d-ink-3); }
.nodi-qs { display: grid; gap: 7px; margin-bottom: 12px; }
.nodi-q { text-align: left; font-family: var(--font-sans); font-size: .86rem; color: var(--d-ink); background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; transition: all .16s; }
.nodi-q:hover { border-color: var(--azure); background: rgba(24,182,246,.08); }
.nodi-a { font-size: .9rem; line-height: 1.55; color: var(--d-ink-2); background: var(--d-surface); border-left: 2px solid var(--azure); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 14px; min-height: 20px; }
.nodi-a b { color: #fff; }
.nodi-a .src { display: inline-block; margin-top: 8px; font-size: .74rem; color: var(--azure); }
.nodi-note { font-size: .72rem; color: var(--d-ink-3); margin-top: 10px; }

.d-cta { display: flex; gap: 10px; margin-top: 24px; }

/* ===== Digest modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(9,20,60,.42); z-index: var(--z-overlay); opacity: 0; transition: opacity .3s var(--e-out); }
.modal-overlay.show { opacity: 1; }
.modal {
  position: fixed; z-index: var(--z-drawer); top: 50%; left: 50%; transform: translate(-50%, -48%);
  width: min(620px, calc(100% - 32px)); max-height: 86vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity .26s var(--e-out), transform .26s var(--e-out);
}
.modal.show { opacity: 1; transform: translate(-50%, -50%); }
@media (prefers-reduced-motion: reduce) { .modal, .modal-overlay { transition: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-sub { font-size: .9rem; color: var(--slate); margin-top: 6px; max-width: 52ch; }
.digest-body { padding: 20px 26px 28px; }
.digest-intro { font-size: .9rem; color: var(--slate); margin-bottom: 16px; }
.digest-intro b { color: var(--navy); }
.digest-list { list-style: none; display: grid; gap: 4px; }
.digest-list li { border-top: 1px solid var(--line); }
.digest-list li:first-child { border-top: 0; }
/* řádek je tlačítko -> proklik do detailu zakázky (jako karty ve feedu) */
.digest-row { display: grid; grid-template-columns: 42px 1fr auto auto; gap: 14px; align-items: center; width: 100%; padding: 13px 12px; border-radius: var(--r-sm); background: none; border: 0; font: inherit; text-align: left; color: inherit; cursor: pointer; transition: background-color .14s; }
.digest-row:hover { background: var(--mist); }
.digest-row:hover .dg-title { color: var(--blue); }
.digest-row .t-chev { color: var(--slate-soft); display: grid; place-items: center; }
.digest-row .t-chev svg { width: 16px; height: 16px; }
.digest-row:hover .t-chev { color: var(--blue); }
.dg-score { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; text-align: center; }
.dg-score[data-band="high"] { color: var(--rel-high-ink); }
.dg-score[data-band="mid"]  { color: var(--rel-mid-ink); }
.dg-title { font-size: .94rem; color: var(--navy); font-weight: 500; line-height: 1.3; }
.dg-buyer { font-size: .8rem; color: var(--slate); }
.dg-dl { font-size: .78rem; font-weight: 600; color: var(--slate); white-space: nowrap; }
.dg-dl.warn { color: var(--warn-ink); }
.digest-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--slate-soft); display: flex; align-items: center; gap: 8px; }

/* ===== Responsivita ===== */
@media (max-width: 1080px) {
  .statbar-inner { grid-template-columns: repeat(3, 1fr); }
  .scard:nth-child(4)::before, .scard:nth-child(1)::before { content: none; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .filters { position: static; }
}
@media (max-width: 620px) {
  .appbar-run { display: none; }
  .appbar-inner { gap: 10px; padding: 0 14px; }
  .appbar .brand-name { font-size: 1rem; }
  .appbar-actions { gap: 8px; }
  #openDigest .btn-lbl { display: none; }
  #openDigest { padding: 8px 10px; }
  .statbar-inner { grid-template-columns: repeat(2, 1fr); }
  .scard::before { content: none !important; }
  .scard { border-top: 1px solid var(--line); }
  .scard:nth-child(1), .scard:nth-child(2) { border-top: 0; }
  .tender { grid-template-columns: 52px 1fr; }
  .t-chev { display: none; }
  .t-score { width: 52px; height: 52px; }
  .t-score span { font-size: 1rem; }
  .drawer-inner { padding: 20px 18px 36px; }
  .d-facts { grid-template-columns: 1fr; }
}

/* ===== Účet a osobní vhodnost ===== */
.account { position: relative; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 6px; display: grid; gap: 2px; z-index: var(--z-drawer); }
.account-menu button { text-align: left; font-family: var(--font-sans); font-size: .88rem; font-weight: 500; color: var(--navy); background: none; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer; }
.account-menu button:hover { background: var(--mist); color: var(--blue); }
.acc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #1D9E75); box-shadow: 0 0 0 3px rgba(29,158,117,.15); }

.modal-narrow { width: min(430px, calc(100% - 32px)); }
.auth-body, .settings-body { padding: 20px 26px 26px; display: grid; gap: 14px; }
.auth-tabs { margin-bottom: 2px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--slate); }
.field input { font-family: var(--font-sans); font-size: .92rem; color: var(--navy); background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; }
.field input:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 3px var(--rel-mid-bg); }
.auth-error { font-size: .84rem; color: var(--risk, #C0402E); min-height: 1.2em; margin: 0; }
.auth-submit { justify-content: center; }
.auth-reset { justify-self: center; }

.settings-h { font-size: .92rem; margin: 6px 0 0; }
.settings-hint { font-weight: 400; font-size: .78rem; color: var(--slate); }
.interest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.interest-chip { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--navy); background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; cursor: pointer; transition: all .15s; }
.interest-chip:hover { border-color: var(--blue); }
.interest-chip:has(input:checked) { background: var(--rel-mid-bg); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.interest-chip input { accent-color: var(--blue); width: 15px; height: 15px; flex: none; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* skóre vypnuté (nepřihlášen) */
.t-score-off { background: var(--mist) !important; }
.t-score-off span { color: var(--line); font-size: 1.4rem; }
.dh-score-off { background: var(--mist) !important; }
.dh-score-off b { color: var(--line); }
.reason-box-off { display: grid; gap: 10px; justify-items: start; }
.reason-box-off p { margin: 0; color: var(--slate); font-size: .92rem; line-height: 1.5; }
.score-hint { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-sans); font-size: .82rem; font-weight: 600; color: var(--blue); background: var(--rel-mid-bg); border: 1px solid rgba(61,123,255,.25); border-radius: var(--pill); padding: 7px 13px; cursor: pointer; transition: all .16s; }
.score-hint:hover { border-color: var(--blue); transform: translateY(-1px); }
.score-hint[hidden] { display: none; }
@media (max-width: 560px) { .interest-grid { grid-template-columns: 1fr; } }
.auth-tabs { grid-template-columns: 1fr 1fr; }

/* ===== Vstupní brána (přehledy jen pro přihlášené) ===== */
.gate {
  position: fixed; inset: 0; z-index: 60; /* nad appbar (50), pod modaly (70/80) */
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(700px 420px at 12% -8%, rgba(24,182,246,.14), transparent 60%),
    radial-gradient(760px 460px at 106% 108%, rgba(106,63,245,.13), transparent 60%),
    var(--mist);
}
.gate[hidden] { display: none; }
body.gated { overflow: hidden; }
.gate-card {
  width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 38px 36px 30px;
  display: grid; gap: 14px; justify-items: center; text-align: center;
}
.gate-brand { display: grid; gap: 10px; justify-items: center; }
.gate-brand .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--navy); }
.gate-brand .radar { color: var(--blue); }
.gate-card h1 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.01em; }
.gate-card > p { color: var(--slate); font-size: .95rem; line-height: 1.55; margin: 0; }
.gate-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.gate-note { font-size: .78rem; color: var(--slate-soft); margin: 8px 0 0; }
.gate-note a { color: var(--blue-ink); font-weight: 600; }
/* [hidden] musí přebít display z .field (autorská pravidla přebíjejí UA stylesheet) */
.field[hidden] { display: none; }

/* hlavička filtrů: Uložit nastavené filtry + Reset */
.fhead-actions { display: flex; align-items: baseline; gap: 10px; }
.linkbtn-muted { color: var(--slate); font-weight: 500; }
.linkbtn-muted:hover { color: var(--navy); }

/* nastavení upozornění */
.field-select { font-family: var(--font-sans); font-size: .92rem; color: var(--navy); background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; cursor: pointer; }
.field-select:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 3px var(--rel-mid-bg); }
.notify-note { font-size: .84rem; color: var(--slate); margin: 0; }
.notify-note b { color: var(--navy); }
