/* BeaconRMM – stilovi konzole i javnih stranica.
   Bez vanjskih fontova: Inter ako je instaliran, inače Segoe UI (Windows) ili sistemski font. */

:root {
  color-scheme: light;
  --paper: #f4f6fa;        /* pozadina stranice */
  --sheet: #ffffff;        /* kartice, tablice */
  --ink: #0f172a;          /* tekst */
  --graphite: #5b6478;     /* sporedni tekst */
  --rule: #e3e7ef;         /* crte */
  --tint: #f1f4f9;         /* blaga pozadina */
  --signal: #14b8a6;       /* naglasak (logo, potvrda) */
  --signal-ink: #042f2e;
  --accent: #0d9488;       /* glavni gumbi, poveznice u fokusu */
  --accent-hover: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #ccfbf1;
  --accent-strong: #0f766e;
  --focus: #0d9488;
  --danger: #c0362c;
  --open-bg: #fef3c7;  --open-fg: #92400e;  --open-dot: #f59e0b;
  --work-bg: #dbeafe;  --work-fg: #1e40af;  --work-dot: #3b82f6;
  --done-bg: #dcfce7;  --done-fg: #166534;  --done-dot: #22c55e;
  --ok-bg: #ecfdf5;    --err-bg: #fef2f2;
  --off-bg: #eef1f5;   --off-fg: #5b6478;
  --warn: #d97706;     --crit: #dc2626;     --okc: #16a34a;
  --side-bg: #0f172a;  --side-ink: #cbd5e1; --side-muted: #64748b; --side-hover: #1a2436; --side-active: #1e293b;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);

  --font-body: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-label: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
}

/* Tamna tema: prati sustav, osim kad je odabrana ručno (data-theme na <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0b1120; --sheet: #111a2e; --ink: #e2e8f0; --graphite: #94a3b8; --rule: #1f2a40; --tint: #16213a;
    --signal: #2dd4bf; --signal-ink: #042f2e;
    --accent: #14b8a6; --accent-hover: #2dd4bf; --accent-ink: #042f2e; --accent-soft: #0d2f2c; --accent-strong: #5eead4;
    --focus: #2dd4bf; --danger: #f87171;
    --open-bg: #3a2a0a;  --open-fg: #fcd34d;  --open-dot: #f59e0b;
    --work-bg: #14284d;  --work-fg: #93c5fd;  --work-dot: #60a5fa;
    --done-bg: #0f2e1d;  --done-fg: #86efac;  --done-dot: #22c55e;
    --ok-bg: #0f2e1d;    --err-bg: #3b1515;
    --off-bg: #1b2537;   --off-fg: #94a3b8;
    --warn: #fbbf24;     --crit: #f87171;     --okc: #4ade80;
    --side-bg: #070c18;  --side-ink: #cbd5e1; --side-muted: #64748b; --side-hover: #111a2e; --side-active: #16213a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b1120; --sheet: #111a2e; --ink: #e2e8f0; --graphite: #94a3b8; --rule: #1f2a40; --tint: #16213a;
  --signal: #2dd4bf; --signal-ink: #042f2e;
  --accent: #14b8a6; --accent-hover: #2dd4bf; --accent-ink: #042f2e; --accent-soft: #0d2f2c; --accent-strong: #5eead4;
  --focus: #2dd4bf; --danger: #f87171;
  --open-bg: #3a2a0a;  --open-fg: #fcd34d;  --open-dot: #f59e0b;
  --work-bg: #14284d;  --work-fg: #93c5fd;  --work-dot: #60a5fa;
  --done-bg: #0f2e1d;  --done-fg: #86efac;  --done-dot: #22c55e;
  --ok-bg: #0f2e1d;    --err-bg: #3b1515;
  --off-bg: #1b2537;   --off-fg: #94a3b8;
  --warn: #fbbf24;     --crit: #f87171;     --okc: #4ade80;
  --side-bg: #070c18;  --side-ink: #cbd5e1; --side-muted: #64748b; --side-hover: #111a2e; --side-active: #16213a;
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2 { font-family: var(--font-label); font-weight: 650; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.45rem, 3vw, 1.75rem); }
h2 { font-size: 1.08rem; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.ico { width: 18px; height: 18px; flex: none; }

/* Raspored */
main { margin: 0 auto; padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 32px) 64px; width: 100%; }
main.narrow { max-width: 820px; }
main.tight { max-width: 460px; }
main.wide { max-width: 1440px; }

.intro { margin-bottom: 22px; }
.lede { margin: 6px 0 0; color: var(--graphite); max-width: 65ch; }

/* Obavijesti */
.notice {
  margin: 0 0 20px; padding: 11px 16px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--done-dot) 35%, transparent); background: var(--ok-bg);
}
.notice-error { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--err-bg); }

/* Obrasci */
.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow);
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset + fieldset { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
legend { float: left; width: 100%; font-family: var(--font-label); font-weight: 650; font-size: 1.02rem; padding: 0; margin-bottom: 14px; }
legend + * { clear: both; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; margin-bottom: 18px; }
.grid-2:last-child { margin-bottom: 0; }
.grid-2 > .field { margin-bottom: 0; }
.grid-2 .field-date { max-width: 220px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--graphite); opacity: 0.8; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--graphite) 55%, var(--rule)); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.has-error input, .has-error textarea { border-color: var(--danger); }
.hint { margin: 6px 0 0; font-size: 0.86rem; color: var(--graphite); }
.field-error { margin: 6px 0 0; font-size: 0.88rem; font-weight: 600; color: var(--danger); }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 4px 0 18px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }

.actions { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 24px; }
.aside { margin: 0; color: var(--graphite); font-size: 0.97rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: 0.9rem; line-height: 1.2;
  color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 9px 15px; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow); transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--tint); border-color: color-mix(in srgb, var(--graphite) 40%, var(--rule)); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.linklike {
  color: var(--accent-strong); text-decoration: none; font: inherit; font-size: 0.9rem;
  background: none; border: 0; padding: 2px 0; cursor: pointer;
}
.linklike:hover { text-decoration: underline; }

/* Potvrda: odrezak s brojem prijave */
.stub {
  position: relative;
  background: var(--sheet);
  border-radius: 14px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  animation: stub-in 420ms cubic-bezier(.2,.7,.2,1) both;
}
.stub-head {
  position: relative;
  background: var(--signal);
  color: var(--signal-ink);
  border-radius: 13px 13px 0 0;
  padding: 22px clamp(20px, 5vw, 36px) 26px;
}
.stub-head::after { /* rupica kao na servisnoj etiketi */
  content: ""; position: absolute; right: clamp(20px, 5vw, 36px); top: 50%;
  width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 3px rgba(0,0,0,.12);
}
.stub-label { margin: 0; font-weight: 600; font-size: 0.9rem; }
.stub-no {
  margin: 2px 0 0;
  font-family: var(--font-label); font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 4rem); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stub-body {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px;
  margin: 0; padding: 26px clamp(20px, 5vw, 36px) 28px;
  border-top: 2px dashed var(--rule);
}
.stub-body::before, .stub-body::after { /* zarezi perforacije */
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper);
}
.stub-body::before { left: -11px; }
.stub-body::after { right: -11px; }
.stub-body .wide { grid-column: 1 / -1; }
dt { font-size: 0.8rem; color: var(--graphite); }
dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

@keyframes stub-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

/* Popis prijava */
.list-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.search { display: flex; gap: 8px; width: min(100%, 420px); }
.search input { flex: 1; }

.filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.tabs { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.tabs a {
  padding: 10px 0 9px; text-decoration: none; color: var(--graphite); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current], .tabs a[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.count { font-variant-numeric: tabular-nums; color: var(--graphite); font-weight: 400; }
.toggle {
  font-size: 0.85rem; font-weight: 500; text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 4px 13px; margin-bottom: 8px;
}
.toggle:hover { border-color: var(--accent); }
.toggle.is-on { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }

.result-line { color: var(--graphite); margin: 0 0 16px; }

.table-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.tickets { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tickets th {
  text-align: left; font-size: 0.72rem; color: var(--graphite); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--tint); white-space: nowrap;
}
.tickets td { padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tickets tbody tr:last-child td { border-bottom: 0; }
.tickets tbody tr[data-href] { cursor: pointer; }
.tickets tbody tr:hover { background: var(--tint); }
.tickets .no a { font-weight: 600; font-size: 0.95rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tickets .no a:hover { text-decoration: underline; }
.col-desc { width: 34%; min-width: 220px; }
.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; }
.muted { color: var(--graphite); }

.status {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 0.76rem; font-weight: 600; line-height: 1.2;
  padding: 3px 10px 3px 8px; border-radius: 999px;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-otvoreno { background: var(--open-bg); color: var(--open-fg); }
.status-otvoreno::before { background: var(--open-dot); }
.status-u_radu { background: var(--work-bg); color: var(--work-fg); }
.status-u_radu::before { background: var(--work-dot); }
.status-rijeseno { background: var(--done-bg); color: var(--done-fg); }
.status-rijeseno::before { background: var(--done-dot); }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; color: var(--graphite); }

.empty { padding: 44px 24px; text-align: center; background: var(--sheet); border: 1px dashed var(--rule); border-radius: var(--radius); color: var(--graphite); }
.empty p { margin: 0 0 6px; }
.empty p:first-child { font-family: var(--font-label); font-weight: 650; font-size: 1.1rem; color: var(--ink); }

/* Detalji prijave */
.back { margin: 0 0 16px; }
.back a { color: var(--graphite); text-decoration: none; font-size: 0.88rem; }
.back a::before { content: "← "; }
.back a:hover { color: var(--ink); }
.detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 28px; align-items: start; }
.ticket-card, .work { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow); }
.ticket-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.ticket-no { font-size: clamp(1.5rem, 3.5vw, 1.9rem); font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; margin: 20px 0 0; }
.block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); }
.block h2 { margin-bottom: 10px; }
.block-solution { border-top: 0; padding: 18px 20px; background: var(--done-bg); border-radius: var(--radius); }
.block-solution h2 { color: var(--done-fg); }
.meta { color: var(--graphite); font-size: 0.92rem; margin: 12px 0 0; }

.work { position: sticky; top: 16px; }
.work h2 { margin-bottom: 16px; }
.work .actions { margin-top: 8px; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.linklike.danger { color: var(--danger); font-size: 0.88rem; }

/* Manji zasloni */
@media (max-width: 900px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .work { position: static; }
}
@media (min-width: 641px) and (max-width: 860px) {
  .col-desc { display: none; }
}
@media (max-width: 640px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .filters { flex-direction: column; align-items: flex-start; }
  .toggle { margin: 4px 0 12px; }

  /* Tablica prijava kao popis kartica */
  .tickets thead { display: none; }
  .tickets, .tickets tbody { display: block; }
  .tickets tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
    grid-template-areas: "no status" "who who" "desc desc" "meta meta";
    padding: 14px 16px; border-bottom: 1px solid var(--rule);
  }
  .tickets tbody tr:last-child { border-bottom: 0; }
  .tickets td { display: block; padding: 0; border: 0; }
  .tickets .no { grid-area: no; }
  .tickets .c-status { grid-area: status; }
  .tickets .c-who { grid-area: who; font-weight: 700; }
  .tickets .c-who .c-loc-inline { display: block; font-weight: 400; color: var(--graphite); }
  .tickets .c-loc { display: none; }
  .tickets .col-desc { display: block; grid-area: desc; width: auto; min-width: 0; }
  .tickets .c-date { grid-area: meta; font-size: 0.9rem; color: var(--graphite); }
  .tickets .c-tech { display: none; }
}
@media (min-width: 641px) {
  .c-loc-inline { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .grid-2, .stub-body, .facts { grid-template-columns: minmax(0, 1fr); }
  .grid-2 .field-date { max-width: none; }
  .stub-head::after { display: none; }
  .search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Izvještaj – obrazac i akcije */
.report-form { margin-bottom: 20px; }
.rf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 16px 18px; align-items: end; }
.rf-grid .field { margin: 0; }
.rf-submit { padding-bottom: 1px; }
.rf-presets { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 18px 0 0; font-size: 0.95rem; color: var(--graphite); }
.rf-presets a { color: var(--ink); }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 900px) {
  .rf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rf-submit { grid-column: 1 / -1; }
}
@media print {
  .sidebar, .appbar, .public-top, .report-hide, .report-actions, .notice, .inv, .inv-split, .tasks, .ctx-menu, .crumbs { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  main, main.wide { padding: 0; max-width: none; }
}

/* PHP verzija: upravljanje tehničarima */
.tickets.users tr.is-off td { opacity: .6; }
.mail-test { margin-top: 28px; }
.mail-test h2 { margin-top: 0; }
.mail-test .search { margin-top: 12px; max-width: 620px; }
.mail-test .search .btn { white-space: nowrap; }
.mail-test .search input { min-width: 0; flex: 1 1 220px; }
.list-head .btn-primary { white-space: nowrap; }

.status-online { background: var(--done-bg); color: var(--done-fg); }
.status-online::before { background: var(--done-dot); }
.status-offline { background: var(--off-bg); color: var(--off-fg); }
.status-offline::before { background: var(--off-fg); }
.sub { display: block; font-size: 0.88rem; color: var(--graphite); font-family: var(--font-body); font-weight: 400; }
.tickets.agents tr.is-off td.no a { color: var(--graphite); }
.mono { font-family: var(--font-mono); font-size: 0.92rem; overflow-wrap: anywhere; }

meter { width: 56px; height: 10px; vertical-align: middle; }
.load { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.load-val { font-variant-numeric: tabular-nums; min-width: 3.2em; }
.load-warn .load-val, .gauge.load-warn .gauge-val { color: var(--warn); font-weight: 700; }
.load-crit .load-val, .gauge.load-crit .gauge-val { color: var(--crit); font-weight: 700; }

.agent-note { margin-top: 18px; padding: 14px 16px; background: var(--tint); border-radius: var(--radius); }
.agent-note p { margin: 0; }
.agent-note p + p { margin-top: 6px; }

.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.gauge { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; }
.gauge-label { font-size: 0.9rem; color: var(--graphite); }
.gauge-val { font-family: var(--font-label); font-weight: 650; font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge meter { width: 100%; }

.mini { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.mini th { text-align: left; font-size: 0.88rem; color: var(--graphite); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.mini td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.mini tr:last-child td { border-bottom: 0; }

.charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.charts h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--graphite); }
.spark { width: 100%; height: 90px; background: var(--tint); border-radius: 4px; display: block; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--accent); }
.spark-grid { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .clip { flex-basis: 100%; color: var(--graphite); }

.steps { margin: 0 0 22px; padding-left: 1.3em; }
.steps li { margin-bottom: 14px; }
.code { background: var(--tint); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 14px; margin: 8px 0;
  font-family: var(--font-mono); font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--tint); padding: 1px 5px; border-radius: 3px; }

/* RMM: udaljena konzola */
.console-form { margin-bottom: 22px; }
.console-form textarea { min-height: 4.5rem; font-family: var(--font-mono); font-size: 0.95rem; }
.console-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; gap: 2px; }
.seg label { margin: 0; font-weight: 600; font-size: 0.85rem; padding: 4px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg input { accent-color: var(--accent); }
.seg label:has(input:checked) { background: var(--accent-soft); color: var(--accent-strong); }
label.inline { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; }
label.inline select { width: auto; padding: 6px 10px; }
.console-form .actions { margin-top: 12px; }
.cmd-list { display: grid; gap: 14px; }
.cmd { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.cmd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.cmd-line { flex: 1 1 320px; background: none; padding: 0; font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd-meta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 0.9rem; }
.shell-tag { font-weight: 600; font-size: 0.72rem; letter-spacing: .03em; padding: 2px 7px; border-radius: 5px; background: var(--work-bg); color: var(--work-fg); }
.shell-cmd { background: var(--off-bg); color: var(--ink); }
.cmd-status { font-weight: 700; }
.cs-queued, .cs-sent, .cs-running, .cs-cancelling { color: var(--work-fg); }
.cs-done { color: var(--done-fg); }
.cs-error, .cs-timeout, .cs-lost { color: var(--crit); }
.cs-cancelled { color: var(--graphite); }
.term { margin: 0; padding: 12px 14px; max-height: 420px; overflow: auto; background: #0b1220; color: #d7e0ee;
  font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.term:empty { display: none; }
.cmd-error { margin: 0; padding: 8px 14px; color: var(--crit); font-size: 0.92rem; border-top: 1px solid var(--rule); }
.agent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.agent-actions:empty { display: none; }
.head-links { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.shell-rd { background: var(--open-bg); color: var(--open-fg); }
.shell-wu { background: var(--done-bg); color: var(--done-fg); }
.wu-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.wu-table td:first-child { width: 28px; }
.wu-table input { width: 18px; height: 18px; accent-color: var(--accent); }
.wu-form .check { margin-top: 12px; }
.upd-badge { display: block; font-size: 0.85rem; color: var(--open-fg); font-weight: 700; margin-top: 3px; }
.rd-box { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.rd-box h2 { margin-bottom: 4px; }
.rd-box .facts { margin-top: 10px; }
.rd-id { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; }
.rd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.shell-wol { background: var(--work-bg); color: var(--work-fg); }
.shell-sw { background: var(--tint); color: var(--ink); border: 1px solid var(--rule); }
.sw-install { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--tint); }
.sw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sw-row label { margin: 0; flex: 1 0 100%; }
.sw-row select, .sw-row input { width: auto; flex: 1 1 160px; min-width: 0; padding: 7px 10px; }
.sw-row select[name="op"] { flex: 0 0 auto; }
.sw-row .btn { flex: none; }
.sw-table td.mono { white-space: nowrap; font-size: 0.85rem; }
.sw-filter { margin: 0 0 8px; }
.table-scroll { max-height: 520px; overflow: auto; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0 10px; }
.sw-table thead th { position: sticky; top: 0; background: var(--sheet); }
.pkg-form .seg { flex-wrap: wrap; }

.agent-box { margin-top: 26px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--tint); }
.agent-box h2 { margin-bottom: 10px; }

@media (max-width: 600px) {
  .gauges, .charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tickets.agents tr { grid-template-areas: "no status" "loc loc" "cpu cpu" "ram ram" "disk disk"; }
  .tickets.agents td:nth-child(2) { display: block; grid-area: loc; color: var(--graphite); }
  .tickets.agents td:nth-child(3) { display: none; }
  .tickets.agents td:nth-child(4) { grid-area: cpu; }
  .tickets.agents td:nth-child(5) { grid-area: ram; }
  .tickets.agents td:nth-child(6) { grid-area: disk; }
  .tickets.agents td.c-load::before { display: inline-block; width: 3.2em; color: var(--graphite); font-size: 0.9rem; }
  .tickets.agents td:nth-child(4)::before { content: "CPU"; }
  .tickets.agents td:nth-child(5)::before { content: "RAM"; }
  .tickets.agents td:nth-child(6)::before { content: "Disk"; }
}

/* ==========================================================================
   BeaconRMM: raspored konzole (bočni izbornik + gornja traka)
   ========================================================================== */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--side-bg); color: var(--side-ink);
  padding: 18px 12px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 14px; color: #f8fafc; text-decoration: none; font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
.side-brand .mark { width: 32px; height: 32px; flex: none; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.brand-name b { color: #2dd4bf; font-weight: 650; }.side-label { margin: 14px 0 4px; padding: 0 10px; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--side-muted); }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
  color: var(--side-ink); text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
.side-nav a .ico { width: 18px; height: 18px; opacity: .8; }
.side-nav a:hover { background: var(--side-hover); color: #fff; }
.side-nav a[aria-current] { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.side-nav a[aria-current] .ico { opacity: 1; color: #2dd4bf; }
.side-badge { margin-left: auto; background: #f59e0b; color: #412402; font-size: 0.7rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; line-height: 1.5; }
.side-foot { margin: auto 0 0; padding: 14px 10px 0; font-size: 0.72rem; color: var(--side-muted); }

.shell-main { min-width: 0; display: flex; flex-direction: column; }
.appbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(16px, 3vw, 32px); min-height: 60px;
  background: color-mix(in srgb, var(--sheet) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 10;
}
.appbar-search { flex: 1; max-width: 560px; position: relative; margin: 0; }
.appbar-search > .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--graphite); pointer-events: none; }
.appbar-search input { padding: 8px 64px 8px 36px; background: var(--tint); border-color: transparent; }
.appbar-search input:hover { border-color: var(--rule); }
.appbar-search kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font: 600 0.7rem var(--font-body); color: var(--graphite); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 5px; padding: 1px 6px; pointer-events: none;
}
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.appbar-right form { margin: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); color: var(--graphite); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--ink); background: var(--tint); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.86rem; font-weight: 500; }
.user-chip:hover { background: var(--tint); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; }
.theme-light { display: none; }
:root[data-theme="dark"] .theme-light { display: block; }
:root[data-theme="dark"] .theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light { display: block; }
  :root:not([data-theme="light"]) .theme-dark { display: none; }
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-btn, .scrim { display: none; }
.shell-main main { margin: 0 auto; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  #nav-toggle:checked ~ .sidebar { transform: none; }
  #nav-toggle:checked ~ .scrim:not(.tree-scrim),
  #tree-toggle:checked ~ .tree-scrim { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .5); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .appbar-search kbd { display: none; }
  .appbar-search input { padding-right: 12px; }
}
@media (max-width: 640px) {
  .user-name, .hide-sm { display: none; }
  .appbar { gap: 8px; }
  .appbar .btn-sm { padding: 7px 9px; }
}

/* Naslov stranice s akcijama */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .lede { margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Javne stranice (obrazac za prijavu, potvrda) i prijava tehničara
   ========================================================================== */
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.public-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.08rem; }
.public-brand .mark { width: 30px; height: 30px; }
.public-brand .brand-name b { color: var(--accent); }
.public-org { font-weight: 500; color: var(--graphite); font-size: 0.9rem; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--rule); }
.public-link { color: var(--graphite); font-size: 0.88rem; text-decoration: none; }
.public-link:hover { color: var(--ink); text-decoration: underline; }

body.is-bare main.bare { padding: 0; max-width: none; }
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art {
  position: relative; overflow: hidden; background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 56px);
}
.auth-art::after { /* svjetionik u donjem lijevom kutu i lukovi signala */
  content: ""; position: absolute; left: 0; bottom: 0; width: min(560px, 90%); aspect-ratio: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%232DD4BF' stroke-width='2.5'%3E%3Cpath d='M40 280A80 80 0 0 1 120 360' opacity='.55'/%3E%3Cpath d='M40 205A155 155 0 0 1 195 360' opacity='.35'/%3E%3Cpath d='M40 125A235 235 0 0 1 275 360' opacity='.2'/%3E%3Cpath d='M40 40A320 320 0 0 1 360 360' opacity='.1'/%3E%3C/g%3E%3Ccircle cx='40' cy='360' r='18' fill='%232DD4BF' opacity='.22'/%3E%3Ccircle cx='40' cy='360' r='7' fill='%23F8FAFC'/%3E%3C/svg%3E") left bottom / 100% 100% no-repeat;
}
.auth-pitch h2 b { color: #2dd4bf; font-weight: inherit; }
.auth-art .auth-foot { text-align: right; } /* svjetionik je dolje lijevo */
.auth-brand { display: flex; align-items: center; gap: 12px; color: #f8fafc; font-size: 1.3rem; font-weight: 650; position: relative; z-index: 1; }
.auth-brand .mark { width: 42px; height: 42px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.auth-pitch { position: relative; z-index: 1; max-width: 30rem; }
.auth-pitch h2 { color: #f8fafc; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; margin-bottom: 14px; }
.auth-pitch ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.auth-pitch li { display: flex; gap: 10px; align-items: center; }
.auth-pitch li .ico { color: #2dd4bf; }
.auth-foot { position: relative; z-index: 1; font-size: 0.8rem; color: #64748b; margin: 0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px clamp(16px, 5vw, 56px); }
.auth-card { width: min(100%, 380px); }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .lede { margin-bottom: 22px; }
.auth-card .btn-primary { width: 100%; padding: 11px 16px; }
.auth-alt { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--graphite); }
.auth-mobile-brand { display: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.15rem; margin-bottom: 26px; }
  .auth-mobile-brand .mark { width: 34px; height: 34px; }
  .auth-mobile-brand .brand-name b { color: var(--accent); }
}

/* ==========================================================================
   Pregled (nadzorna ploča)
   ========================================================================== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--sheet); border: 1px solid var(--rule); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; position: relative;
}
a.kpi:hover { border-color: var(--accent); }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--graphite); font-weight: 500; }
.kpi-label .ico { width: 16px; height: 16px; }
.kpi-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 1rem; font-weight: 500; color: var(--graphite); }
.kpi-sub { font-size: 0.8rem; color: var(--graphite); }
.kpi.is-ok .kpi-value { color: var(--okc); }
.kpi.is-warn .kpi-value { color: var(--warn); }
.kpi.is-crit .kpi-value { color: var(--crit); }
.kpi-bar { height: 5px; border-radius: 99px; background: var(--off-bg); overflow: hidden; margin-top: 6px; }
.kpi-bar > span { display: block; height: 100%; background: var(--okc); border-radius: 99px; }
progress.kpi-bar { -webkit-appearance: none; appearance: none; width: 100%; border: 0; }
progress.kpi-bar::-webkit-progress-bar { background: var(--off-bg); border-radius: 99px; }
progress.kpi-bar::-webkit-progress-value { background: var(--okc); border-radius: 99px; }
progress.kpi-bar::-moz-progress-bar { background: var(--okc); border-radius: 99px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.panel-head h2 { font-size: 0.98rem; }
.panel-head a { font-size: 0.84rem; text-decoration: none; }
.panel-body { padding: 6px 18px 12px; }
.panel-empty { padding: 26px 18px; color: var(--graphite); text-align: center; margin: 0; }
.panel-empty .ico { color: var(--okc); width: 22px; height: 22px; display: block; margin: 0 auto 6px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--rule); }
.feed li:last-child { border-bottom: 0; }
.feed-ico { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--tint); color: var(--graphite); }
.feed-ico .ico { width: 17px; height: 17px; }
.feed-ico.is-crit { background: var(--err-bg); color: var(--crit); }
.feed-ico.is-warn { background: var(--open-bg); color: var(--open-fg); }
.feed-ico.is-off { background: var(--off-bg); color: var(--off-fg); }
.feed-main { min-width: 0; flex: 1; }
.feed-main a { color: var(--ink); font-weight: 600; text-decoration: none; }
.feed-main a:hover { text-decoration: underline; }
.feed-sub { display: block; font-size: 0.8rem; color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-end { font-size: 0.78rem; color: var(--graphite); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--off-fg); flex: none; }
.dot-on { background: var(--okc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--okc) 20%, transparent); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .kpis { gap: 10px; } .kpi { padding: 13px 14px; } .kpi-value { font-size: 1.5rem; } }
@media (max-width: 340px) { .kpis { grid-template-columns: minmax(0, 1fr); } }

/* Status-točka u tablici računala */
.tickets.agents td.no a { display: inline-flex; align-items: center; gap: 9px; }

/* ==========================================================================
   Stranica računala: zaglavlje i kartice (tabovi)
   ========================================================================== */
.agent-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.agent-hero h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agent-hero .meta { margin-top: 6px; }
.agent-hero .agent-actions { margin-top: 0; }
.agent-tabs { display: flex; gap: 4px 24px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.agent-tabs a { padding: 10px 0 9px; white-space: nowrap; text-decoration: none; color: var(--graphite); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.agent-tabs a:hover { color: var(--ink); }
.agent-tabs a[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.agent-tabs .count { font-size: 0.78rem; margin-left: 4px; }
.tab-panel { scroll-margin-top: 80px; }
.js-tabs .tab-panel[hidden] { display: none; }
.tab-panel > .block:first-child, .tab-panel > section.block:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Rezultati pretrage */
.search-group + .search-group { margin-top: 24px; }
.search-group h2 { margin-bottom: 10px; font-size: 0.98rem; }

/* Kartice na stranici računala */
.tab-panel > .rd-box:first-child, .tab-panel > .gauges:first-child, .tab-panel > .agent-note:first-child { margin-top: 0; }
#postavke .work-form, #postavke .danger-zone { max-width: 640px; }
#postavke h2 { margin-bottom: 14px; }

/* Više stranaka */
.client-switch { position: relative; display: flex; align-items: center; margin: 0; }
.client-switch > .ico { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--graphite); pointer-events: none; }
.client-switch select { width: auto; max-width: 220px; padding: 7px 30px 7px 32px; font-weight: 600; font-size: 0.86rem; background-color: var(--tint); border-color: transparent; }
.client-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; margin-top: 14px; }
.client-checks .check { margin-bottom: 8px; }
.client-access .seg { margin-top: 6px; }
.client-badge { display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; font-size: 0.88rem; }
.client-badge .ico { width: 16px; height: 16px; }
.client-install, .install-client { margin-bottom: 20px; }
.client-install h2, .client-form h2 { margin-bottom: 8px; }
.install-client .search { width: min(100%, 420px); }
@media (max-width: 1000px) { .client-switch select { max-width: 150px; } }
@media (max-width: 640px) { .client-switch select { max-width: 110px; padding-right: 22px; } .client-switch > .ico { display: none; } .client-switch select { padding-left: 10px; } }

/* Odbacivanje upozorenja na Pregledu */
.panel-head .head-links { display: inline-flex; align-items: center; gap: 14px; }
.panel-head form, .feed form { margin: 0; }
.panel-head .linklike { font-size: 0.84rem; }
.icon-btn-sm { width: 28px; height: 28px; border-color: transparent; background: transparent; box-shadow: none; }
.icon-btn-sm .ico { width: 15px; height: 15px; }

/* Nadogradnja agenta i backup */
.shell-upd { background: var(--accent-soft); color: var(--accent-strong); }
.status-failed { background: var(--err-bg); color: var(--crit); }
.status-failed::before { background: var(--crit); }
.upd-badge.is-crit { color: var(--crit); }
.upd-badge.is-muted { color: var(--graphite); font-weight: 600; }
.filters .head-links { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.filters .head-links form { margin: 0; }
.agent-actions form { margin: 0; }

/* Mobilna aplikacija */
.app-sheet { margin-bottom: 20px; }
.app-sheet h2 { margin-bottom: 6px; }
.app-sheet h3 { font-size: 0.95rem; margin: 22px 0 6px; }
.app-row { margin-top: 12px; }
.push-state { margin: 0 0 4px; font-weight: 500; }
.push-prefs { margin-top: 8px; }
.push-prefs .check { margin-bottom: 8px; }
.inline-form { display: inline; margin: 0 0 0 auto; }
@media (display-mode: standalone) {
  /* U instaliranoj aplikaciji nema adresne trake: malo više mjesta gore. */
  .appbar { padding-top: max(10px, env(safe-area-inset-top)); }
}
.push-diag { list-style: none; margin: 6px 0 10px; padding: 10px 12px; background: var(--tint); border-radius: 8px; font-size: 0.84rem; display: grid; gap: 3px; }
.push-diag .ok { color: var(--okc); }
.push-diag .bad { color: var(--crit); }

/* Linux upute */
.linux-install { margin-top: 20px; }
.linux-install h3 { font-size: 0.92rem; margin: 18px 0 4px; }

/* Mreža (SNMP uređaji) */
.device-list { display: grid; gap: 16px; }
.device { padding: 16px 18px; }
.device-head { display: flex; align-items: center; gap: 12px; }
.device-title { flex: 1; min-width: 0; }
.device-title h2 { font-size: 1rem; }
.device-title .meta { margin: 2px 0 0; }
.dot-down { background: var(--crit); }
.dot-warn { background: var(--warn); }
.device-probs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.86rem; }
.device-probs .is-crit { color: var(--crit); }
.device-probs .is-warn { color: var(--warn); }
.device-facts { margin-top: 12px; }
.device-facts .wide { grid-column: 1 / -1; }
.supplies { display: grid; gap: 6px; margin-top: 12px; }
.supply { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.supply-name { flex: 0 0 45%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supply meter { flex: 1; height: 10px; }
.supply-val { width: 3.5em; text-align: right; font-variant-numeric: tabular-nums; }
.device .rd-actions form { margin: 0; }

.shell-sh { background: var(--done-bg); color: var(--done-fg); }

/* Mreža: kompaktni redovi koji se rasklapaju */
.device-list.panel { display: block; padding: 0; gap: 0; }
.device-list .device { border-bottom: 1px solid var(--rule); padding: 0; }
.device-list .device:last-child { border-bottom: 0; }
.device-row { display: grid; grid-template-columns: 14px minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.2fr) 120px 110px; align-items: center; gap: 12px; padding: 10px 16px; font-size: 0.9rem; }
.device-row-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--graphite); font-weight: 600; background: var(--tint); border-bottom: 1px solid var(--rule); }
summary.device-row { cursor: pointer; list-style: none; }
summary.device-row::-webkit-details-marker { display: none; }
summary.device-row:hover { background: var(--tint); }
.device[open] > summary.device-row { background: var(--tint); }
.device-name { min-width: 0; display: flex; flex-direction: column; }
.device-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-prob { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-prob.is-crit { color: var(--crit); }
.device-prob.is-warn { color: var(--warn); }
.device-type, .device-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.84rem; }
.device-body { padding: 4px 16px 16px 42px; }
.device-body .meta { margin-top: 0; }
@media (max-width: 760px) {
  .device-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .device-row > :nth-child(3), .device-row > :nth-child(4), .device-row > :nth-child(6) { display: none; }
  .device-row-head { display: none; }
  .device-body { padding-left: 16px; }
}

.device-row .mono { white-space: nowrap; overflow-wrap: normal; font-size: 0.84rem; }

.device-body .device-facts { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 20px; }


/* Upozorenja */
.alert-form h3 { font-size: 0.95rem; margin: 24px 0 8px; }
.alert-form h3:first-of-type { margin-top: 8px; }
.alert-grid .check { margin-bottom: 10px; align-items: center; }
.alert-grid .check > span { line-height: 2.1; }
.check input.w-num { width: 5.2em; height: auto; margin: 0 4px; padding: 4px 6px; display: inline-block; vertical-align: baseline; text-align: right; }
.check input.w-num.has-error { border-color: var(--crit); }
.alert-own { margin-top: 4px; padding-left: 14px; border-left: 3px solid var(--rule); }
.dot-crit { background: var(--crit); }
.alerts-active td .dot { margin-right: 6px; }
.status-sla-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.status-sla-over { background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit); }

/* Ranjivosti */
.notice-warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
select.w-auto { width: auto; max-width: 100%; }
.check select.w-auto { display: inline-block; margin: 0 4px; padding: 4px 28px 4px 8px; height: auto; vertical-align: baseline; border: 1px solid var(--rule); }
.status-expl { background: var(--crit); color: #fff; }
.status-expl::before { background: #fff; }
.vuln-sev .status { margin: 0 4px 3px 0; }
.vuln-sev .sub { display: block; }
.vuln-agents td .status { margin: 2px 4px 2px 6px; }
.vuln-list tr.is-expl td, .vuln-mini tr.is-expl td { background: color-mix(in srgb, var(--crit) 5%, transparent); }
.vuln-kb a { white-space: nowrap; margin-right: 6px; }
.vuln-mini td { vertical-align: top; }

/* Lokalni korisnici i dijeljenje ažuriranja */
.reveal { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.reveal p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.reveal p + p { margin-top: 6px; }
.reveal-pw { font-size: 1.05rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--tint); user-select: all; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.pw-reset { position: relative; }
.pw-reset summary { list-style: none; cursor: pointer; }
.pw-reset summary::-webkit-details-marker { display: none; }
.pw-reset[open] summary { background: var(--tint); }
.pw-form { position: absolute; right: 0; z-index: 5; margin-top: 6px; width: 280px; padding: 12px; display: grid; gap: 8px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); white-space: normal; }
.pw-form .check { margin: 0; }
.users-table td { vertical-align: top; }
.p2p-meta { margin: 8px 0 12px; }
.p2p-meta .inline-form { margin: 0 0 0 4px; }
.p2p-meta a { margin-left: 6px; }
tr.is-new td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.admin-show { margin: -8px 0 20px; }

/* Nadzor servisa i Event Loga */
.chip-link { display: inline-block; margin: 4px 6px 0 0; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.86rem; text-decoration: none; }
.chip-link:hover { border-color: var(--accent); }
.inline-check { display: inline-flex; margin-right: 16px; }
.inline-fields { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-fields .w-num { width: 6em; }
.svc-table td, .evt-table td { vertical-align: top; }
.evt-msg { max-width: 60ch; font-size: 0.88rem; }
#svc-q { margin: 8px 0; max-width: 320px; }
tr.is-off td { opacity: 0.6; }

/* ==========================================================================
   0.9.9: raspored kao vCenter – uski izbornik s ikonama, stablo stranaka i
   računala, izbornik desnog klika, traka "Nedavni zadaci"
   ========================================================================== */
/* 1.0.0: gornja traka je fiksna, ispod nje navigator (lijevo) i sadržaj (desno). */
:root { --tb-h: 48px; }
.shell.has-tree { grid-template-columns: var(--tree-w, 290px) 5px minmax(0, 1fr); min-height: calc(100vh - var(--tb-h)); }
.shell-main { min-height: calc(100vh - var(--tb-h)); }
.tree-btn { display: none; }

/* Navigator */
.inv { position: sticky; top: var(--tb-h); height: calc(100vh - var(--tb-h)); min-width: 0; display: flex; flex-direction: column; background: var(--sheet); }
.inv-split { position: sticky; top: var(--tb-h); height: calc(100vh - var(--tb-h)); cursor: col-resize; background: var(--sheet); border-left: 1px solid var(--rule); }
.inv-split:hover, .inv-split.is-drag, .inv-split:focus-visible { background: var(--accent); border-color: var(--accent); outline: none; }
.inv-head { display: flex; align-items: center; gap: 2px; min-height: 34px; padding: 0 8px 0 14px; }
.inv-title { flex: 1; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); }
.inv-btn { display: inline-flex; border: 0; background: none; color: var(--graphite); padding: 5px; border-radius: 6px; cursor: pointer; }
.inv-btn:hover { background: var(--tint); color: var(--ink); }
.inv-btn .ico { width: 15px; height: 15px; }
.inv-filter { position: relative; padding: 8px 10px; }
.inv-filter > .ico { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--graphite); pointer-events: none; }
.inv-filter input { padding: 6px 10px 6px 31px; font-size: 0.85rem; background: var(--tint); border-color: transparent; }
.inv-hint { margin: 0; padding: 8px 14px 10px; font-size: 0.72rem; color: var(--graphite); border-top: 1px solid var(--rule); }

.inv-list { flex: 1; overflow: auto; padding: 2px 0 10px; font-size: 0.86rem; user-select: none; }
.tn { display: flex; align-items: center; gap: 4px; min-height: 29px; padding-right: 10px; border-left: 3px solid transparent; }
.tn-root { padding-left: 4px; }
.tn-client { padding-left: 18px; }
.tn-pc { padding-left: 50px; }
.tn:hover { background: var(--tint); }
.tn.is-sel { background: var(--accent-soft); border-left-color: var(--accent); }
.tn.is-sel .tname { font-weight: 600; }
.tw { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--graphite); cursor: pointer; border-radius: 4px; }
.tw:hover { background: var(--rule); }
.tw::before { content: ""; width: 6px; height: 6px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; transform: rotate(-45deg); transition: transform .12s; }
.tn[aria-expanded="true"] > .tw::before { transform: rotate(45deg); }
.tl { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; padding: 4px 0; color: var(--ink); text-decoration: none; }
.tl:hover { text-decoration: none; color: var(--ink); }
.tl:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 3px; }
.tico { width: 16px; height: 16px; flex: none; color: var(--graphite); }
.tn-client .tico { color: var(--accent); }
.tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcnt { font-size: 0.72rem; color: var(--graphite); font-variant-numeric: tabular-nums; }
.tflag { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--crit); }
.tflag.is-warn { background: var(--warn); }
.tico-wrap { position: relative; display: inline-flex; flex: none; }
.tdot { position: absolute; right: -3px; bottom: -2px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--sheet); background: var(--okc); }
.lv-warn .tdot { background: var(--warn); }
.lv-crit .tdot { background: var(--crit); }
.lv-off .tdot { background: var(--off-fg); }
.lv-off .tname { color: var(--graphite); }
.tempty { margin: 2px 0; padding: 3px 10px 3px 54px; font-size: 0.8rem; color: var(--graphite); }
.tnomatch { padding-left: 16px; }

/* Putanja (stranka › računalo) */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 0.82rem; color: var(--graphite); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Izbornik desnog klika */
.ctx-menu { position: fixed; z-index: 200; min-width: 240px; max-width: 340px; padding: 5px 0; font-size: 0.88rem;
  background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(2, 6, 23, .22), 0 2px 6px rgba(2, 6, 23, .12); }
.ctx-head { padding: 4px 14px 7px; margin-bottom: 4px; font-size: 0.72rem; color: var(--graphite); border-bottom: 1px solid var(--rule); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 6px 14px; cursor: default; white-space: nowrap; outline: none; }
.ctx-item .ico { width: 16px; height: 16px; flex: none; color: var(--graphite); }
.ctx-item:hover:not(.is-dis), .ctx-item:focus:not(.is-dis), .ctx-item.is-act { background: var(--accent); color: var(--accent-ink); }
.ctx-item:hover:not(.is-dis) .ico, .ctx-item:focus:not(.is-dis) .ico, .ctx-item.is-act .ico { color: inherit; }
.ctx-item.is-dis { color: var(--graphite); opacity: .55; }
.ctx-item.is-danger:not(.is-dis) { color: var(--danger); }
.ctx-item.is-danger:hover:not(.is-dis), .ctx-item.is-danger:focus:not(.is-dis) { background: var(--danger); color: #fff; }
.ctx-arr { margin-left: auto; padding-left: 16px; }
.ctx-sep { height: 1px; margin: 4px 0; background: var(--rule); }

/* Nedavni zadaci (donja traka) */
.tasks { position: sticky; bottom: 0; z-index: 9; margin-top: auto; background: var(--sheet); border-top: 1px solid var(--rule); box-shadow: 0 -2px 10px rgba(15, 23, 42, .05); }
.tasks-head { display: flex; align-items: center; gap: 12px; padding: 5px clamp(16px, 3vw, 32px); }
.tasks-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; background: none; color: var(--ink); font: 600 0.82rem var(--font-label); cursor: pointer; }
.tchev::before { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; transform: rotate(-135deg) translate(-1px, -1px); transition: transform .12s; }
.tasks-toggle[aria-expanded="true"] .tchev::before { transform: rotate(45deg) translate(-1px, -1px); }
.tasks-sum { font-size: 0.78rem; color: var(--graphite); }
.tasks-body { max-height: 220px; overflow: auto; padding: 0 clamp(16px, 3vw, 32px) 8px; }
.tasks-table { width: 100%; }
.tasks-table .tlabel { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tstat { font-size: 0.8rem; font-weight: 600; }
.tstat.is-run { color: var(--work-fg); }
.tstat.is-ok { color: var(--okc); }
.tstat.is-bad { color: var(--crit); }

@media (max-width: 1000px) {
  .shell.has-tree { grid-template-columns: minmax(0, 1fr); }
  .inv { position: fixed; left: 0; top: var(--tb-h); bottom: 0; height: auto; width: min(330px, 88vw); z-index: 30; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(2, 6, 23, .3); }
  #tree-toggle:checked ~ .inv { transform: none; }
  .inv-split { display: none; }
  .tree-btn { display: inline-flex; }
  .tasks-table th:nth-child(4), .tasks-table td:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .inv, .has-tree .sidebar, .tw::before, .tchev::before { transition: none; }
}

/* ==========================================================================
   1.0.0: gornja traka (izbornik, tražilica, tehničar), kartice navigatora,
   sažetak stranke
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--tb-h);
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
  background: var(--side-bg); color: var(--side-ink); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.tb-brand { display: flex; align-items: center; gap: 9px; padding: 0 10px 0 4px; color: #f8fafc; text-decoration: none; font-size: 1.02rem; font-weight: 650; white-space: nowrap; }
.tb-brand .mark { width: 26px; height: 26px; flex: none; border-radius: 6px; }
.tb-brand:hover { color: #fff; text-decoration: none; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--side-ink); font: 500 0.86rem var(--font-body); cursor: pointer; white-space: nowrap;
  text-decoration: none; list-style: none; position: relative;
}
.tb-btn::-webkit-details-marker { display: none; }
.tb-btn.tree-btn { display: none; }
.tb-btn .ico { width: 17px; height: 17px; }
.tb-btn .tb-chev { width: 13px; height: 13px; opacity: .7; }
.tb-btn:hover, .tb-dd[open] > .tb-btn { background: var(--side-hover); color: #fff; text-decoration: none; }
.tb-btn:focus-visible { outline: 2px solid #2dd4bf; outline-offset: 1px; }
.tb-new { background: var(--accent); color: var(--accent-ink); }
.tb-new:hover { background: var(--accent-hover); color: var(--accent-ink); }
.tb-badge { position: absolute; top: 1px; left: 19px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #f59e0b; color: #412402; font-size: 0.64rem; font-weight: 700; line-height: 16px; text-align: center; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-dd { position: relative; }
.tb-pop {
  position: absolute; top: calc(100% + 6px); z-index: 50; min-width: 240px; padding: 6px;
  background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 14px 36px rgba(2, 6, 23, .25), 0 2px 6px rgba(2, 6, 23, .12);
}
.tb-pop-menu { left: 0; display: grid; grid-template-columns: repeat(2, minmax(210px, 1fr)); gap: 0 8px; }
.tb-pop-user { right: 0; }
.tb-sec { padding: 2px 0 6px; }
.tb-label { margin: 6px 10px 4px; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--graphite); }
.tb-pop a, .tb-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: 500 0.87rem var(--font-body); text-align: left; text-decoration: none; cursor: pointer;
}
.tb-pop a .ico, .tb-pop button .ico { width: 17px; height: 17px; color: var(--graphite); }
.tb-pop a:hover, .tb-pop button:hover { background: var(--tint); text-decoration: none; }
.tb-pop a[aria-current] { background: var(--accent-soft); color: var(--accent-strong); }
.tb-pop a[aria-current] .ico { color: var(--accent-strong); }
.tb-pop form { margin: 0; }
.tb-who { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.tb-who strong { display: block; font-size: 0.9rem; }
.tb-who span { font-size: 0.78rem; color: var(--graphite); }
.topbar .avatar { width: 26px; height: 26px; font-size: 0.7rem; background: #134e4a; color: #ccfbf1; }
.topbar .appbar-search { flex: 1; max-width: 560px; margin: 0 auto; }
.topbar .appbar-search input { height: 34px; padding-top: 0; padding-bottom: 0; background: var(--side-hover); border-color: transparent; color: #f1f5f9; }
.topbar .appbar-search input::placeholder { color: var(--side-muted); }
.topbar .appbar-search input:hover { border-color: #334155; }
.topbar .appbar-search input:focus { background: #0b1222; border-color: #2dd4bf; }
.topbar .appbar-search > .ico { color: var(--side-muted); }
.topbar .appbar-search kbd { background: transparent; color: var(--side-muted); border-color: #334155; }
.shell-main main { width: 100%; }

/* Kartice navigatora */
.nav-tabs { display: grid; grid-template-columns: repeat(4, 1fr); flex: none; border-bottom: 1px solid var(--rule); background: var(--tint); }
.nav-tabs button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px;
  border: 0; background: transparent; color: var(--graphite); font: 500 0.7rem var(--font-body); cursor: pointer;
}
.nav-tabs button .ico { width: 19px; height: 19px; }
.nav-tabs button:hover { color: var(--ink); background: var(--sheet); }
.nav-tabs button[aria-selected="true"] { color: var(--accent-strong); background: var(--sheet); }
.nav-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 2px; background: var(--accent); }
.nav-tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.nav-badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--crit); color: #fff; font-size: 0.62rem; font-weight: 700; line-height: 16px; }
.nav-badge.is-info { background: var(--work-dot); }
.nav-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nav-panel[hidden] { display: none; }
.nav-panel .inv-list { flex: 1; }
.tn-grp { padding-left: 4px; }
.tn-leaf { padding-left: 26px; }
.tsub { margin-left: 6px; font-size: 0.72rem; color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.tn-leaf .tname { flex: 0 1 auto; }
.tn-sev .tl { gap: 9px; padding-left: 2px; }
.sev-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--off-fg); }
.sev-crit .sev-dot { background: var(--crit); }
.sev-warn .sev-dot { background: var(--warn); }
.tn-sev .tname { font-weight: 600; }
.tk-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--open-dot); margin: 0 4px 0 3px; }
.tk-u_radu .tk-dot { background: var(--work-dot); }
.inv-head a.inv-btn { text-decoration: none; }

/* Sažetak stranke / svih stranaka (desno) */
.sum-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.sum-tile { display: block; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
a.sum-tile:hover { border-color: var(--accent); text-decoration: none; }
.sum-tile small { display: block; font-size: 0.76rem; color: var(--graphite); margin-bottom: 2px; }
.sum-tile b { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.sum-tile b em { font-style: normal; font-size: 0.95rem; color: var(--graphite); font-weight: 500; }
.sum-tile.is-crit b { color: var(--crit); }
.sum-tile.is-warn b { color: var(--warn); }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.sum-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); min-width: 0; }
.sum-card > h2 { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--graphite); display: flex; align-items: center; gap: 8px; }
.sum-card > h2 a { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.8rem; }
.sum-card .sum-body { padding: 12px 14px; }
.sum-card .mini { width: 100%; }
.sum-card .mini td, .sum-card .mini th { padding-left: 14px; }
.sum-card .sum-empty { margin: 0; padding: 12px 14px; color: var(--graphite); font-size: 0.86rem; }
.sum-wide { grid-column: 1 / -1; }
.lvl { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lvl-crit { color: var(--crit); } .lvl-warn { color: var(--warn); } .lvl-ok { color: var(--okc); } .lvl-off { color: var(--off-fg); }
.why-list { margin: 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--graphite); }

@media (max-width: 1000px) {
  .tb-btn.tree-btn { display: inline-flex; }
  .topbar .appbar-search kbd { display: none; }
  .topbar .appbar-search input { padding-right: 12px; }
}
@media (max-width: 760px) {
  .tb-brand-txt, .topbar .user-name, .topbar .tb-chev { display: none; }
  .tb-pop-menu { position: fixed; left: 8px; right: 8px; top: calc(var(--tb-h) + 4px); grid-template-columns: minmax(0, 1fr); max-height: calc(100vh - var(--tb-h) - 16px); overflow: auto; }
  .tb-pop-user { position: fixed; right: 8px; top: calc(var(--tb-h) + 4px); }
  .topbar { gap: 4px; padding: 0 8px; }
  .tb-btn { padding: 0 8px; }
}
@media print { .topbar { display: none !important; } }
.report-form .rf-check { grid-column: 1 / -1; align-self: center; }

/* ==========================================================================
   1.0.1: dvostupanjska prijava (MFA)
   ========================================================================== */
.mfa-setup { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin: 12px 0; }
.mfa-qr { background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--rule); line-height: 0; }
.mfa-qr svg { width: 240px; height: 240px; display: block; }
.mfa-manual { flex: 1 1 220px; min-width: 0; }
.mfa-secret { font-size: 1.02rem; letter-spacing: .04em; word-break: break-all; margin: 6px 0; }
.mfa-steps { margin: 8px 0 4px 1.2em; padding: 0; }
.mfa-steps li { margin: 3px 0; }
.mfa-code-input { font-family: var(--mono, ui-monospace, monospace); font-size: 1.3rem; letter-spacing: .18em; max-width: 14ch; }
.mfa-state { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.mfa-state.is-on { color: var(--ok, #15803d); }
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 4px 28px; margin: 8px 0 10px 1.4em; padding: 0; font-size: 1rem; }
.mfa-manage .actions, .mfa-enable .actions { flex-wrap: wrap; }
.btn.danger-btn { color: var(--danger); }
.mfa-badge { font-size: .78rem; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--rule); margin-left: 4px; white-space: nowrap; }
.mfa-badge.is-on { color: var(--ok, #15803d); border-color: currentColor; }
@media (max-width: 480px) { .mfa-codes { grid-template-columns: 1fr; } .mfa-qr svg { width: 220px; height: 220px; } }
/* 1.0.2: postavke e-pošte i preseljenje računala */
.mail-group { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px 4px; margin: 0 0 14px; }
.mail-group legend { font-weight: 600; padding: 0 6px; }
.src-badge { font-size: .72rem; font-weight: 500; padding: 0 6px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted, #64748b); margin-left: 4px; vertical-align: middle; }
.src-badge.is-db { color: var(--ok, #15803d); border-color: currentColor; }
.sub-check { margin-top: 4px; font-size: .88rem; }
.mfa-confirm { margin-top: 10px; }
.migrate-table td:first-child, .migrate-table th:first-child { width: 36px; }
.migrate-on { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; justify-content: space-between; }
.migrate-on p { margin: 0; }