/* Vizuelni sloj: savremeniji, mirniji prikaz bez izmene sadržaja ili ponašanja. */
:root {
  --paper: #f4f7f5;
  --white: #ffffff;
  --ink: #122020;
  --ink-soft: #566563;
  --dark: #102526;
  --dark-2: #183334;
  --line: #dbe4e0;
  --line-dark: #a7b7b1;
  --accent: #f06449;
  --signal: #008a74;
  --yellow: #e3c46e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 8px 24px rgba(16, 37, 38, .055);
  --shadow: 0 20px 54px rgba(16, 37, 38, .09);
}

html { background: var(--paper); }
body {
  background:
    radial-gradient(circle at 8% 21%, rgba(0, 138, 116, .055), transparent 23rem),
    radial-gradient(circle at 94% 48%, rgba(240, 100, 73, .045), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.62;
}
.wrap { max-width: 1280px; }

/* Uvod i navigacija */
.header-inner { max-width: 1480px; min-height: 330px; }
.header-copy { padding-top: 42px; padding-bottom: 40px; }
header h1 { text-wrap: balance; }
header p { color: #d3dcda; font-size: 15.5px; }
.header-meta { border-color: rgba(255,255,255,.17); }
.izraz-mark { border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.hero-photo img { transition: transform .8s ease, filter .8s ease; }
header:hover .hero-photo img { transform: scale(1.035); filter: saturate(.8) contrast(1.05) brightness(.87); }
.hero-status-line { padding: 12px 14px; border-radius: 12px; background: rgba(7,20,20,.62); backdrop-filter: blur(8px); }

.appnav {
  border-bottom-color: rgba(18,32,32,.1);
  box-shadow: 0 10px 28px rgba(16,37,38,.075);
}
.appnav-inner { max-width: 1280px; padding: 8px 24px; gap: 6px; }
.appnav a {
  min-height: 48px;
  border: 0 !important;
  border-radius: 12px;
  color: #667572;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.appnav a:hover { background: #edf3f0; transform: translateY(-1px); }
.appnav a[aria-current="page"] { background: #e4f1ec; color: var(--dark); }
.appnav a[aria-current="page"]:after { left: 18px; right: 18px; bottom: 3px; height: 2px; border-radius: 99px; }

#workspace { max-width: 1280px; padding-top: 38px; padding-bottom: 44px; }
.view-head { max-width: 920px; margin: 0 auto 34px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.view-head .eyebrow { font-size: 11px; letter-spacing: .15em; }
.view-head h2 { font-size: clamp(34px, 4.1vw, 52px); text-wrap: balance; }
.view-head p { max-width: 760px; font-size: 14.5px; line-height: 1.65; }

/* Pregled */
.kpis {
  gap: 12px;
  border: 0;
  margin-bottom: 26px;
}
.kpi, .kpi:not(:first-child), .kpi:nth-child(even) {
  min-height: 136px;
  padding: 22px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-sm);
}
.kpi .n { font-size: 40px; }
.kpi .l { margin-top: 13px; font-size: 11px; line-height: 1.48; }
.active-strip { padding: 18px 20px; border-radius: var(--radius); box-shadow: 0 15px 34px rgba(16,37,38,.12); }
.settlement-jump { padding: 8px 12px; border-radius: 999px; }
.latest {
  padding: 34px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.latest>.stamp, .pill { border-radius: 999px; }
.latest>h2 { font-size: clamp(28px, 3vw, 38px); }
.latest .notice { border-radius: 12px; padding: 14px 16px; }
.latest-kpis { gap: 10px; }
.latest-kpis .box { padding: 15px; border-radius: 14px; background: #f6f9f7; }
.download-row a { padding: 11px 14px; border-radius: 12px; }
.decision-expander { border-radius: 14px; background: #fbfcfb; }
.decision-expander>summary { padding: 15px 16px; }
.decision-expander>summary:before { border-radius: 7px; }
.viz-grid { gap: 12px; border: 0; background: transparent; }
.viz-card { padding: 22px; border: 1px solid var(--line) !important; border-radius: 16px; background: #fafcfb; }

/* Naselja i filteri */
.systemic-callout {
  margin-bottom: 26px;
  padding: 20px 22px;
  border: 1px solid #edd7d0;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
}
.history-label { padding: 14px 16px; border: 1px solid #c9ded6; border-left: 4px solid var(--signal); border-radius: 14px; }
.filter-presets { padding: 3px 0 14px; gap: 12px; }
.preset { padding: 8px 2px; font-size: 10.5px; }
.bar {
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-sm);
}
.fld label { font-size: 10.5px; }
.fld select, .fld input, .doc-search input {
  min-height: 46px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: #fff;
}
.btn { min-height: 44px; border-radius: 11px; }
.subbar { padding: 2px 4px 0; line-height: 1.7; }
#app.grid { gap: 12px; border: 0; }
details.vcard {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-sm);
}
details.vcard:before { border-radius: 16px 0 0 16px; }
details.vcard[open] { border-color: #bdcbc6; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
details.vcard>summary { min-height: 88px; padding: 18px 18px 18px 23px; }
.vname { font-size: 19px; }
.pill { padding: 5px 9px; font-size: 9.5px; }
.vbody { padding: 0 22px 25px; }
.latest-state, details.act, details.doccat { border-radius: 12px !important; }

/* Prijave, grafikoni i obrazac */
.device-view .bsection, .docs-view .docsection {
  padding: 34px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.docs-view .docsection { border-top-color: var(--signal); }
.bsection h2, .docsection h2 { font-size: clamp(24px, 2.4vw, 32px); }
.bsection h3 { margin-top: 32px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 17px; }
.bsection p, .bsection .lead { max-width: 980px; }
.bkpis { gap: 10px; }
.bkpis .kpi { min-height: 124px; }
.chart { padding: 52px 16px 8px; border-radius: 16px; background: #f7faf8; }
.hyp, .formula, .calc, .cres .cbox, .cverdict { border-radius: 12px; }
.hyp { padding: 13px 15px; background: #f7faf8; }
.calc { padding: 18px; background: #f4f8f6; }
.calc input, .prijava input[type=text], .prijava input[type=email], .prijava input[type=number], .prijava select, .prijava textarea, .prijava input[type=file] {
  min-height: 45px;
  border-radius: 10px;
}
.prijava { padding: 22px; border: 1px solid #82b9aa; border-radius: 16px; box-shadow: var(--shadow-sm); }
.prijava .sagl { border-radius: 12px; }

/* Dokumentacija */
.doc-search {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-sm);
}
details.doccat { overflow: hidden; border: 1px solid var(--line); background: #fff; }
details.doccat>summary { min-height: 58px; padding: 15px 17px; background: #f5f8f6; }
.doclink {
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8faf9;
}
.doclink:hover { border-color: #86b7aa; background: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.docgrp h5 { margin-top: 8px; font-size: 13px; }

table { font-size: 13.5px; }
th { padding: 8px 9px; font-size: 10.5px; }
td { padding: 9px; }
footer { border-top-color: var(--line-dark); }
.latest>.stamp { color: #b52e27; }
.viz-label { color: #a83c2b !important; }
.access-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.access-links a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  color: #4c5c59;
  text-decoration: none;
}
.access-links a:hover { color: var(--dark); text-decoration: underline; text-underline-offset: 3px; }
.access-links a:focus-visible { outline: 3px solid rgba(0, 112, 93, .35); outline-offset: 2px; }

@media (max-width: 900px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .appnav-inner { padding-left: 14px; padding-right: 14px; }
  #workspace { padding-top: 30px; }
  .header-inner { min-height: 310px; }
  .latest, .device-view .bsection, .docs-view .docsection { padding: 26px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  .header-copy { padding: 29px 20px 27px; }
  header h1 { font-size: 37px; }
  header p { font-size: 13.5px; }
  .hero-photo { min-height: 216px; }
  .hero-status-line { right: 10px; bottom: 10px; max-width: 190px; padding: 9px 10px; }
  .appnav-inner { padding: 6px; gap: 3px; }
  .appnav a { min-height: 47px; padding: 0 5px; border-radius: 9px; font-size: 8.5px; }
  #workspace { padding-top: 24px; padding-bottom: 30px; }
  .view-head { margin-bottom: 24px; padding-bottom: 22px; }
  .view-head h2 { font-size: 34px; }
  .view-head p { font-size: 13.5px; }
  .kpis { gap: 8px; }
  .kpi, .kpi:not(:first-child), .kpi:nth-child(even) { min-height: 118px; padding: 17px 14px; border-radius: 14px; }
  .kpi .n { font-size: 32px; }
  .kpi .l { font-size: 9.5px; }
  .latest, .device-view .bsection, .docs-view .docsection { padding: 21px 16px; border-radius: 17px; }
  .latest>h2 { font-size: 27px; }
  .latest-kpis .box { border-radius: 11px; }
  .js .bar.js-only { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; border-radius: 14px; }
  .bar .fld { min-width: 0; }
  .bar .fld:nth-child(3), .bar .fld:last-child { grid-column: 1 / -1; }
  details.vcard { border-radius: 14px; }
  details.vcard>summary { min-height: 80px; padding: 15px 14px 15px 19px; }
  .vbody { padding: 0 14px 18px; }
  .pill { font-size: 9px; }
  .doc-search { padding: 11px; border-radius: 14px; }
  .doclink { align-items: flex-start; font-size: 12px; }
  .doclink .ext { font-size: 9.5px; }
  .prijava { padding: 15px; }
  .access-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo img { transition: none; }
}
