/* 7.9.63 — fixed header, product pages, footer logo, tab bell, edition rail, nalog command center */

html body.bu-landing-page,
html body.bu-product-page,
html body.bu-author-page,
html body.bu-public-inner {
  --bu-head-h: 58px;
}

html:has(.landing-shell),
html:has(body.bu-landing-page),
html:has(body.bu-product-page) {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Header is pinned to the viewport — sticky failed inside overflow ancestors. */
html body.bu-landing-page .bu-neon-head,
html body.bu-product-page .bu-neon-head,
html body.bu-author-page .bu-neon-head,
html body .landing-shell-main > .bu-neon-head,
html body.bu-landing-page .bu-neon-head.is-home,
html body.bu-landing-page .bu-neon-head.is-inner,
html body.bu-landing-page .bu-neon-head.is-stuck,
html body.bu-landing-page .bu-neon-head.is-hidden,
html body.bu-product-page .bu-neon-head.is-inner,
html body.bu-product-page .bu-neon-head.is-home,
html body.bu-landing-page [data-landing-header].bu-neon-head,
html body.bu-product-page [data-landing-header].bu-neon-head {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  z-index: 2147482000 !important;
  height: var(--bu-head-h) !important;
  min-height: var(--bu-head-h) !important;
  margin: 0 !important;
  transform: none !important;
  filter: none !important;
  contain: none !important;
  will-change: auto !important;
  left: auto !important;
  width: auto !important;
}
html body.bu-landing-page .landing-shell-main,
html body.bu-product-page .landing-shell-main,
html body.bu-author-page .landing-shell-main,
html body.bu-public-inner .landing-shell-main {
  padding-top: var(--bu-head-h) !important;
}

@media (min-width: 1100px) {
  html body.bu-landing-page .bu-neon-head,
  html body.bu-product-page .bu-neon-head,
  html body.bu-author-page .bu-neon-head,
  html body .landing-shell-main > .bu-neon-head,
  html body.bu-landing-page .bu-neon-head.is-home,
  html body.bu-landing-page .bu-neon-head.is-inner,
  html body.bu-product-page .bu-neon-head.is-inner,
  html body.bu-landing-page [data-landing-header].bu-neon-head {
    left: 232px !important;
    width: auto !important;
  }
}
@media (max-width: 1099px) {
  html body.bu-landing-page .bu-neon-head,
  html body.bu-product-page .bu-neon-head,
  html body.bu-author-page .bu-neon-head,
  html body .landing-shell-main > .bu-neon-head,
  html body.bu-landing-page .bu-neon-head.is-home,
  html body.bu-landing-page .bu-neon-head.is-inner,
  html body.bu-product-page .bu-neon-head.is-inner,
  html body.bu-landing-page [data-landing-header].bu-neon-head {
    left: 0 !important;
    width: 100% !important;
  }
}

/* Product / blog / fallback prose: never a 100dvh cage */
html body.bu-product-page main.bu-pro,
html body.bu-product-page main.bu-blog,
html body.bu-product-page main.bu-page,
html body.bu-product-page main.bu-prose {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  flex: none !important;
  position: relative !important;
  background: #f4efe4 !important;
  color: #1a2332 !important;
}
html body.bu-product-page main.bu-page,
html body.bu-product-page main.bu-prose {
  padding: 28px 32px 72px;
  max-width: 1080px;
  margin: 0 auto;
}

/* —— Footer: real brand file on a light plate —— */
html body .bu-pub-foot .bu-pub-foot-logo {
  display: inline-flex;
  align-items: center;
  max-width: 280px;
}
html body .bu-pub-foot .bu-pub-foot-logo .bu-brand-file,
html body .bu-pub-foot .bu-pub-foot-logo-img-wrap,
html body .bu-pub-foot .bu-pub-foot-logo picture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff !important;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
html body .bu-pub-foot .bu-pub-foot-logo img,
html body .bu-pub-foot .bu-pub-foot-logo-img {
  display: block;
  max-height: 40px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  filter: none !important;
}

/* —— Board tab bell: raised, contrast on green, gold when watching —— */
html body .bu-stab {
  overflow: visible !important;
  position: relative;
}
html body .bu-stab-bell {
  flex: 0 0 auto;
  width: 20px !important;
  height: 20px !important;
  padding: 3px;
  border-radius: 7px;
  background: #1e293b;
  color: #f1f5f9 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
  z-index: 3;
  filter: none !important;
}
html body .bu-stab.is-on .bu-stab-bell {
  background: #0f172a;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.45), 0 4px 10px rgba(0, 0, 0, 0.28);
}
html body .bu-stab.watch .bu-stab-bell {
  background: #facc15 !important;
  color: #422006 !important;
  box-shadow: 0 0 0 2px #ca8a04, 0 0 14px rgba(250, 204, 21, 0.95);
}
html body .bu-stab.is-on.watch .bu-stab-bell {
  background: #fde047 !important;
  color: #422006 !important;
  box-shadow: 0 0 0 2px #fff, 0 0 16px rgba(253, 224, 71, 1);
}

/* —— Edition rail: stacked, 232px, no spill —— */
html body .bu-board-sidebar,
html body .bu-board-sidebar-foot {
  overflow-x: hidden !important;
  min-width: 0 !important;
}
html body .bu-edition-rail,
html body.bu-board-page .bu-edition-rail,
html body.bu-nalog-page .bu-edition-rail {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  overflow: hidden !important;
  margin: 8px 0 !important;
  padding: 8px !important;
}
html body .bu-edition-rail-k,
html body.bu-board-page .bu-edition-rail-k {
  margin: 0 0 6px !important;
  font-size: 9px !important;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .bu-edition-track,
html body.bu-board-page .bu-edition-track {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 6px !important;
  overflow: hidden !important;
  width: 100%;
}
html body .bu-edition-card,
html body.bu-board-page .bu-edition-card {
  flex: none !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 8px !important;
  overflow: hidden !important;
  box-sizing: border-box;
}
html body .bu-edition-flag {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #e2e8f0;
}
html body .bu-edition-meta {
  min-width: 0;
  overflow: hidden;
}
html body .bu-edition-card strong,
html body.bu-board-page .bu-edition-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px !important;
}
html body .bu-edition-card span,
html body.bu-board-page .bu-edition-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px !important;
  opacity: 0.72;
}

/* —— Nalog Pregled command center —— */
html body.bu-nalog-page .bu-dash-v3 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1180px;
}
html body.bu-nalog-page .bu-cc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  background: linear-gradient(135deg, #0b6e86 0%, #0f766e 55%, #134e4a 100%);
  color: #f8fafc;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
html body.bu-nalog-page .bu-cc-who {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
html body.bu-nalog-page .bu-cc-who img,
html body.bu-nalog-page .bu-cc-who .bu-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}
html body.bu-nalog-page .bu-cc-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
html body.bu-nalog-page .bu-cc-hero h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: #fff !important;
}
html body.bu-nalog-page .bu-cc-lead {
  margin: 6px 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
  max-width: 62ch;
}
html body.bu-nalog-page .bu-cc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
html body.bu-nalog-page .bu-cc-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
html body.bu-nalog-page .bu-cc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html body.bu-nalog-page .bu-cc-actions .bu-btn {
  min-width: 168px;
  justify-content: center;
}
html body.bu-nalog-page .bu-cc-actions .bu-btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff !important;
}

html body.bu-nalog-page .bu-cc-sys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
html body.bu-nalog-page .bu-cc-sys a,
html body.bu-nalog-page .bu-cc-sys > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dbe4ee;
  text-decoration: none;
  color: #0f172a;
  min-width: 0;
}
html body.bu-nalog-page .bu-cc-sys small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
html body.bu-nalog-page .bu-cc-sys strong {
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.25;
}
html body.bu-nalog-page .bu-cc-sys .is-ok { border-color: #86efac; background: #f0fdf4; }
html body.bu-nalog-page .bu-cc-sys .is-warn { border-color: #fcd34d; background: #fffbeb; }
html body.bu-nalog-page .bu-cc-sys .is-bad { border-color: #fca5a5; background: #fef2f2; }

html body.bu-nalog-page .bu-cc-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
html body.bu-nalog-page .bu-cc-metrics a,
html body.bu-nalog-page .bu-cc-metrics > div {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dbe4ee;
  text-decoration: none;
  color: inherit;
}
html body.bu-nalog-page .bu-cc-metrics small {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
html body.bu-nalog-page .bu-cc-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  letter-spacing: -0.04em;
  color: #0f172a;
}

html body.bu-nalog-page .bu-cc-ops {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
html body.bu-nalog-page .bu-cc-ops a,
html body.bu-nalog-page .bu-cc-ops button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #dbe4ee;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #0f172a;
  text-decoration: none;
}
html body.bu-nalog-page .bu-cc-ops a:hover,
html body.bu-nalog-page .bu-cc-ops button:hover {
  border-color: #0b6e86;
  box-shadow: 0 10px 24px rgba(11, 110, 134, 0.08);
}
html body.bu-nalog-page .bu-cc-ops strong { font-size: 15px; }
html body.bu-nalog-page .bu-cc-ops span { font-size: 13px; color: #64748b; }

html body.bu-nalog-page .bu-cc-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
}
html body.bu-nalog-page .bu-cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
html body.bu-nalog-page .bu-cc-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe4ee;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
html body.bu-nalog-page .bu-cc-chip:hover {
  border-color: #0b6e86;
  color: #0b6e86;
}
html body.bu-nalog-page .bu-cc-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html body.bu-nalog-page .bu-cc-note {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe4ee;
  text-decoration: none;
  color: #0f172a;
}
html body.bu-nalog-page .bu-cc-note strong { display: block; font-size: 13px; }
html body.bu-nalog-page .bu-cc-note span { font-size: 12px; color: #64748b; }

html body.bu-nalog-page .bu-grace-chip {
  background: #facc15;
  color: #422006 !important;
  font-weight: 800;
}
html body.bu-nalog-page .bu-cc-body .bu-dash-panel,
html body.bu-nalog-page .bu-cc-body .bu-contact-panel {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  padding: 16px 18px;
}
html body.bu-nalog-page .bu-cc-body .bu-dash-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
html body.bu-nalog-page .bu-cc-body .bu-dash-list-head h2,
html body.bu-nalog-page .bu-cc-body .bu-dash-panel h2 {
  margin: 0;
  font-size: 16px;
}

html body .bu-foot .bu-foot-logo-img-wrap,
html body .bu-foot .bu-brand-file {
  display: inline-flex;
  margin-bottom: 10px;
}
html body .bu-foot .bu-foot-logo-img {
  max-height: 36px;
  width: auto;
}

@media (max-width: 980px) {
  html body.bu-nalog-page .bu-cc-hero,
  html body.bu-nalog-page .bu-cc-body {
    grid-template-columns: 1fr;
  }
  html body.bu-nalog-page .bu-cc-sys,
  html body.bu-nalog-page .bu-cc-metrics,
  html body.bu-nalog-page .bu-cc-ops {
    grid-template-columns: 1fr 1fr;
  }
  html body.bu-nalog-page .bu-cc-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 640px) {
  html body.bu-nalog-page .bu-cc-sys,
  html body.bu-nalog-page .bu-cc-metrics,
  html body.bu-nalog-page .bu-cc-ops {
    grid-template-columns: 1fr;
  }
}
