/* BEDEM Intel: stranica servisa. Iste boje kao BEDEM: crveno = blokira se,
   teal = samo se meri (senka), amber = upozorenje, plavo = sve što se klikće.
   Bez spoljnih resursa (strogi CSP). */

@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #11161c;
  --bg-2: #151b22;
  --surface: #182029;
  --surface-2: #1d2631;
  --surface-3: #243040;
  --line: #283340;
  --line-2: #344152;
  --text: #e3e8ee;
  --text-2: #a2adba;
  --text-3: #6f7c8c;
  --blue: #5ea2f2;
  --blue-bg: rgba(94, 162, 242, .12);
  --ok: #46b97c;
  --ok-bg: rgba(70, 185, 124, .13);
  --teal: #46b6c8;
  --teal-bg: rgba(70, 182, 200, .13);
  --warn: #e2a33d;
  --warn-bg: rgba(226, 163, 61, .13);
  --crit: #ee6553;
  --crit-bg: rgba(238, 101, 83, .13);
  --bar-a: #e0604f;
  --bar-s: #3fa3b3;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --sans: "Plex Sans", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f4f7;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --surface-3: #eceff3;
    --line: #e0e4ea;
    --line-2: #cdd3dc;
    --text: #17202a;
    --text-2: #4b5766;
    --text-3: #7a8594;
    --blue: #2563c9;
    --blue-bg: rgba(37, 99, 201, .09);
    --ok: #1d8a54;
    --ok-bg: rgba(29, 138, 84, .1);
    --teal: #11808f;
    --teal-bg: rgba(17, 128, 143, .1);
    --warn: #a5690b;
    --warn-bg: rgba(196, 128, 18, .12);
    --crit: #c63a2a;
    --crit-bg: rgba(198, 58, 42, .09);
    --bar-a: #d0503f;
    --bar-s: #2c95a5;
    --shadow: 0 10px 30px rgba(23, 32, 42, .14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--blue); }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
h1 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.brand .sub { color: var(--text-3); font-size: 13px; }
.top-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
main { max-width: 1320px; margin: 0 auto; padding: 20px 24px 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; min-width: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > .card { margin-bottom: 16px; }

.btn { font: inherit; font-weight: 500; border: 1px solid var(--blue); background: var(--blue); color: #fff;
  border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--line-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

input, select { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 7px 10px; min-width: 0; }

.pill { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

.banner { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; border: 1px solid; }
.banner.crit { background: var(--crit-bg); color: var(--crit); border-color: var(--crit); }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.banner.teal { background: var(--teal-bg); color: var(--text); border-color: var(--teal); }

.login { display: flex; justify-content: center; padding-top: 6vh; }
.login-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.login-card p { margin: 0; }
.login-card label { font-weight: 500; margin-top: 6px; }
.cmd { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 0; overflow-x: auto; }
.err { color: var(--crit); }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; margin-bottom: 0; }
.kpi-l { color: var(--text-2); font-size: 12.5px; }
.kpi-v { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kpi-v.crit { color: var(--crit); }
.kpi-v.teal { color: var(--teal); }
.kpi-v.warn { color: var(--warn); }
.kpi-s { color: var(--text-3); font-size: 12.5px; min-height: 18px; }

.legend { color: var(--text-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.sw.a { background: var(--bar-a); }
.sw.s { background: var(--bar-s); }

.bars { display: flex; flex-direction: column; gap: 2px; }
.bar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 64px; align-items: center; gap: 10px;
  padding: 4px 6px; border-radius: 6px; cursor: pointer; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.bar:hover { background: var(--surface-3); }
.bar.on { background: var(--blue-bg); }
.bar-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-n .sub { color: var(--text-3); font-size: 12px; }
.bar-t { height: 10px; border-radius: 3px; background: var(--surface-2); display: flex; overflow: hidden; }
.bar-t i { display: block; height: 100%; }
.bar-t i.a { background: var(--bar-a); }
.bar-t i.s { background: var(--bar-s); }
.bar-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.bars .empty { padding: 6px; }

.tw { overflow-x: auto; }
.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-weight: 500; color: var(--text-2); background: var(--surface-2); padding: 7px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t td.n, .t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.t td.nw { white-space: nowrap; }
.t.click tbody tr { cursor: pointer; }
.t.click tbody tr:hover td { background: var(--surface-3); }
.t tbody tr:last-child td { border-bottom: 0; }

.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 4px; margin: 1px 4px 1px 0;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag.strong { background: var(--crit-bg); color: var(--crit); }
.tag.block { background: var(--crit-bg); color: var(--crit); font-weight: 600; }
.tag.grey { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.tag.shadow { background: var(--teal-bg); color: var(--teal); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--text-3); }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.crit { background: var(--crit); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input { flex: 1 1 200px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; color: var(--text-2); }
.empty { color: var(--text-2); margin: 8px 0 0; }

.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; padding: 4px 2px; }

.detail { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line-2);
  border-radius: 12px; background: var(--surface); color: var(--text); padding: 0; box-shadow: var(--shadow); }
.detail::backdrop { background: rgba(0, 0, 0, .5); }
.detail-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.detail-h h2 { font-family: var(--mono); font-size: 16px; }
#d-body { padding: 16px 18px 20px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; }
.why { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
#d-body h3 { font-size: 14px; margin: 16px 0 8px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  main { padding: 16px; }
  .top { padding: 10px 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-v { font-size: 22px; }
  .bar { grid-template-columns: minmax(90px, 40%) 1fr 54px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 6px; }
}
