:root { --bg:#f4f7fa; --card:#ffffff; --ink:#1d2733; --muted:#5b6b7f; --brand:#2563eb; --danger:#c0392b; --line:#dde3ec; --ok:#15803d; }
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 12px; position: sticky; top: 0; z-index: 50; }
.nav-menu { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.nav-menu .nav-link { display: inline-block; padding: 6px 14px; font-size: 13px; color: var(--muted); text-decoration: none; border-radius: 6px; font-weight: 500; transition: background-color 0.12s, color 0.12s; }
.nav-menu .nav-link:hover { background: #eef2f7; color: var(--ink); }
.nav-menu .nav-link.nav-active { background: var(--brand); color: #fff; }
.nav-menu .nav-link.nav-active:hover { background: var(--brand); color: #fff; }
.brand { font-weight: 600; font-size: 15px; color: var(--brand); }
.header-right { display: flex; gap: 14px; align-items: center; }
.lang-toggle button { background: none; border: 1px solid var(--line); padding: 4px 10px; cursor: pointer; border-radius: 4px; font-size: 12px; }
.lang-toggle button.active { background: var(--brand); color: white; border-color: var(--brand); }
.login-shell { display:flex; justify-content:center; align-items:center; min-height: calc(100vh - 100px); padding: 24px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 32px; max-width: 480px; width: 100%; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.login-card h1 { margin-top: 0; font-size: 22px; }
.login-card label { display:block; margin-top: 16px; margin-bottom: 6px; font-weight: 500; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; font-family: monospace; font-size: 14px; }
.login-card button { margin-top: 16px; padding: 10px 18px; background: var(--brand); color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: 500; }
.login-card button:hover { opacity: 0.9; }
.login-card .error { background: #fef2f2; color: var(--danger); padding: 10px; border-radius: 4px; margin-top: 16px; border: 1px solid #fee2e2; }
.login-card .cf-turnstile { margin-top: 16px; }
.criminal-exposure h2 { color: #b91c1c; }
.criminal-exposure .ce-disclaimer { background: #fef2f2; border-left: 3px solid #b91c1c; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: #5b2828; }
.criminal-exposure .ce-disclaimer .ce-disclaimer-label { display:block; font-weight: 600; margin-bottom: 4px; }
.criminal-exposure .ce-sub { margin-top: 18px; }
.criminal-exposure .ce-sub h3 { font-size: 14px; margin: 0 0 6px 0; color: #1d2733; }
.criminal-exposure .ce-sub p { margin: 0; font-size: 13px; line-height: 1.55; }
.criminal-exposure .ce-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 14px; }
.criminal-exposure .ce-table th, .criminal-exposure .ce-table td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.criminal-exposure .ce-table th { background: #f8fafc; text-align: left; font-weight: 600; }
.criminal-exposure .ce-table .ce-col-today { background: #fffbeb; }
.criminal-exposure .ce-table .ce-col-escalated { background: #fef2f2; }
.criminal-exposure .ce-table .ce-row-param { width: 24%; font-weight: 600; color: var(--muted); }
.criminal-exposure .ce-citations { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.criminal-exposure .ce-citations .ce-cit-label { font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
.criminal-exposure .ce-citations ul { margin: 0; padding-left: 18px; }
.criminal-exposure .ce-citations li { margin-bottom: 4px; line-height: 1.45; }
.body-bullets { margin: 8px 0; padding-left: 22px; }
.body-bullets li { margin-bottom: 6px; line-height: 1.55; }
.body-bullets li::marker { color: var(--brand); }
.body-paragraph { margin: 0 0 10px 0; font-size: 13px; line-height: 1.6; }
.body-paragraph:last-child { margin-bottom: 0; }
.body-paragraph strong { font-weight: 700; color: var(--ink); }
.body-callout { background: #fef9c3; border-left: 3px solid #ca8a04; padding: 10px 14px; margin: 12px 0; font-size: 13px; line-height: 1.6; color: #422f00; border-radius: 4px; }
.body-callout .body-callout-label { display: inline-block; font-weight: 800; color: #713f12; margin-right: 8px; letter-spacing: 0.5px; font-size: 11px; padding: 2px 8px; background: rgba(202, 138, 4, 0.18); border-radius: 4px; vertical-align: 2px; }
.body-callout strong { color: #422f00; }
.body-callout-kritično,
.body-callout-critical { background: #fee2e2; border-left-color: #b91c1c; color: #5b1010; }
.body-callout-kritično .body-callout-label,
.body-callout-critical .body-callout-label { color: #7f1d1d; background: rgba(185, 28, 28, 0.16); }
.body-callout-kritično strong,
.body-callout-critical strong { color: #5b1010; }
.body-callout-hitno,
.body-callout-urgent { background: #fff1f2; border-left-color: #dc2626; color: #5b1010; }
.body-callout-hitno .body-callout-label,
.body-callout-urgent .body-callout-label { color: #7f1d1d; background: rgba(220, 38, 38, 0.16); }
.body-callout-posledica,
.body-callout-consequence { background: #fef2f2; border-left-color: #b91c1c; color: #5b1010; }
.body-callout-posledica .body-callout-label,
.body-callout-consequence .body-callout-label { color: #7f1d1d; background: rgba(185, 28, 28, 0.18); }
.body-callout-bitno,
.body-callout-important { background: #eff6ff; border-left-color: #2563eb; color: #1e3a8a; }
.body-callout-bitno .body-callout-label,
.body-callout-important .body-callout-label { color: #1e3a8a; background: rgba(37, 99, 235, 0.16); }
.body-callout-napomena,
.body-callout-note { background: #f8fafc; border-left-color: #64748b; color: #334155; }
.body-callout-napomena .body-callout-label,
.body-callout-note .body-callout-label { color: #475569; background: rgba(100, 116, 139, 0.16); }
.body-callout-preporuka,
.body-callout-recommendation { background: #ecfdf5; border-left-color: #15803d; color: #064e3b; }
.body-callout-preporuka .body-callout-label,
.body-callout-recommendation .body-callout-label { color: #064e3b; background: rgba(21, 128, 61, 0.16); }
.legal-notice { background: #fafafa; }
.legal-notice h2 { color: #1d2733; border-bottom: 2px solid #1d2733; padding-bottom: 8px; }
.legal-notice .ln-letterhead { background: #fff; border: 1px dashed #9aa3b2; padding: 12px 16px; margin-bottom: 18px; font-style: italic; color: #5b6b7f; font-size: 12.5px; line-height: 1.5; }
.legal-notice .ln-disclaimer { background: #fffbeb; border-left: 3px solid #b8860b; padding: 8px 12px; margin-bottom: 18px; font-size: 12px; color: #5b4500; }
.legal-notice .ln-disclaimer .ln-disclaimer-label { display: block; font-weight: 600; margin-bottom: 4px; color: #5b4500; }
.legal-notice .ln-meta { background: #fff; border: 1px solid var(--line); padding: 12px 16px; margin-bottom: 18px; font-size: 13px; line-height: 1.55; }
.legal-notice .ln-meta-row { margin-bottom: 8px; }
.legal-notice .ln-meta-row:last-child { margin-bottom: 0; }
.legal-notice .ln-meta-label { display: inline-block; min-width: 88px; font-weight: 600; color: var(--muted); vertical-align: top; }
.legal-notice .ln-section { margin-top: 18px; }
.legal-notice .ln-section h3 { font-size: 14px; margin: 0 0 8px 0; color: #1d2733; font-weight: 600; }
.legal-notice .ln-section h3 .ln-numeral { display: inline-block; min-width: 28px; color: var(--muted); font-weight: 700; }
.legal-notice .ln-section p { margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-line; }
.legal-notice .ln-list { margin-top: 18px; }
.legal-notice .ln-list h3 { font-size: 14px; margin: 0 0 10px 0; color: #1d2733; font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.legal-notice .ln-list ol { margin: 0; padding-left: 24px; }
.legal-notice .ln-list li { margin-bottom: 10px; font-size: 13px; line-height: 1.55; }
.legal-notice .ln-list li::marker { font-weight: 700; color: var(--brand); }
.legal-notice .ln-closing { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.legal-notice .ln-closing h3 { font-size: 14px; margin: 0 0 8px 0; }
.legal-notice .ln-signature { margin-top: 24px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); text-align: right; font-size: 13px; line-height: 1.7; }
.legal-notice .ln-signature .ln-sig-greeting { font-style: italic; color: var(--muted); margin-bottom: 12px; }
.legal-notice .ln-signature .ln-sig-line { display: block; }
.legal-notice .ln-citations { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.legal-notice .ln-citations .ln-cit-label { font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
.legal-notice .ln-citations ul { margin: 0; padding-left: 18px; }
.legal-notice .ln-citations li { margin-bottom: 4px; line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.dash { padding: 24px; max-width: 980px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 20px 24px; margin-bottom: 16px; }
.card h2 { margin-top: 0; font-size: 17px; color: var(--brand); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.facts-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts-table td:first-child { width: 160px; color: var(--muted); white-space: nowrap; font-family: monospace; font-size: 12px; }
.statute { padding: 10px 14px; background: #f8fafc; border-left: 3px solid var(--brand); margin-bottom: 8px; font-size: 13px; }
.statute strong { color: var(--brand); }
.request-box { padding: 14px 18px; background: #fffbeb; border-left: 3px solid #f59e0b; }
.identity-block { font-family: monospace; font-size: 12px; white-space: pre-wrap; background: #f8fafc; padding: 12px 14px; border-radius: 4px; }
.evidence-anchor { font-family: monospace; font-size: 11px; word-break: break-all; background: #f8fafc; padding: 10px; border-radius: 4px; }
.footer { padding: 16px 24px; text-align: right; }
#logout-btn { background: none; border: 1px solid var(--line); padding: 4px 10px; cursor: pointer; border-radius: 4px; font-size: 12px; }
.forecast h2 { color: #6b21a8; border-bottom-color: #e9d5ff; }

/* Consolidated exposure section — top of the page, owner headline */
.card.total-exposure { background: #fdecec; border-color: #f5b7b1; border-left: 4px solid var(--danger); }
.card.total-exposure h2 { color: var(--danger); border-bottom-color: #f5b7b1; }
.te-lead { font-size: 13px; line-height: 1.55; }
.te-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.te-table th { background: #f8fafc; padding: 8px 10px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.te-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.te-table td.figure { text-align: right; font-weight: 600; white-space: nowrap; }
.te-table tr.te-total-row td { background: #fff5f5; font-weight: 700; border-top: 2px solid var(--danger); color: var(--danger); }

/* Alert callouts (DreamWeb suppression + ESET findings) */
.card.alert-callout { background: #fef3c7; border-left: 4px solid #d97706; }
.card.alert-callout h2 { color: #92400e; border-bottom-color: #fde68a; }
.callout-implication { background: var(--card); border-left: 3px solid var(--danger); padding: 10px 14px; font-size: 13px; margin-top: 10px; }
.eset-bullets { margin: 8px 0; padding-left: 24px; }
.eset-bullets li { margin-bottom: 6px; }
.forecast h3.sub { font-size: 13px; margin: 14px 0 6px 0; color: var(--muted); font-weight: 600; }
.forecast h3.method-h { font-size: 14px; margin: 14px 0 6px 0; color: var(--muted); font-weight: 600; }
.forecast.card { background: #faf7ff; border-color: #e9d5ff; }
.posture-note { background: #fef3c7; border-left: 3px solid #d97706; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }
.method-block { font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
.method-block p { margin: 0 0 10px 0; }
.method-caveat { background: #fee2e2; border-left: 3px solid #dc2626; padding: 12px 14px; font-size: 13px; margin: 14px 0; }
.citations { font-size: 12px; }
.citations h3 { font-size: 13px; margin: 14px 0 6px 0; color: var(--muted); font-weight: 600; }
.citations ul { margin: 0; padding-left: 18px; }
.citations li { margin-bottom: 4px; }
.citations a { color: #6b21a8; text-decoration: none; }
.citations a:hover { text-decoration: underline; }
.sliders { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 12px 0 16px 0; }
.slider-group { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; }
.slider-group label { display:block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.slider-group input[type=range] { width: 100%; }
.slider-group .val { display: inline-block; font-family: monospace; font-size: 13px; font-weight: 600; color: var(--ink); }
.summary-band { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; margin-bottom: 14px; }
.summary-band table { width: 100%; border-collapse: collapse; font-size: 13px; }
.summary-band td { padding: 4px 6px; }
.summary-band td:first-child { width: 50%; color: var(--muted); }
.summary-band td:last-child { font-family: monospace; text-align: right; }
.summary-band tr.total td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; color: var(--ink); }
.grid-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
.grid-table th, .grid-table td { padding: 6px 8px; text-align: right; border: 1px solid var(--line); font-family: monospace; }
.grid-table th:first-child, .grid-table td:first-child { text-align: left; font-family: -apple-system, system-ui, sans-serif; color: var(--muted); background: #f8fafc; }
.grid-table thead th { background: #f8fafc; color: var(--muted); font-weight: 500; }
.violation-list { font-size: 12px; margin: 8px 0 0 0; padding-left: 18px; color: var(--muted); }
.violation-list li { margin-bottom: 3px; }
.violation-list code { background: #fff; padding: 1px 4px; border-radius: 2px; color: var(--ink); font-size: 11px; }
@media (max-width: 700px) { .sliders { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .dash { padding: 12px; } .header-right { flex-direction: column; gap: 6px; align-items: flex-end; } }

/* ─── Operator fiscal bill (invoice CXAI-ENRG-2026-001) ─────────────── */
.fiscal-bill-card { border-left: 4px solid var(--ok); }
.fiscal-bill-card h2 { color: var(--ok); border-bottom: 1px solid #dcfce7; padding-bottom: 6px; }
.fb-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.fb-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.fb-table th { background: #f8fafc; padding: 6px 8px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.fb-table th.num-col { text-align: right; }
.fb-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fb-table td.num { text-align: right; font-family: ui-monospace, "SF Mono", Menlo, monospace; white-space: nowrap; }
.fb-table tr.fb-subtotal td { background: #f0fdf4; font-weight: 700; border-top: 2px solid var(--ok); color: var(--ok); }
.fb-table tr.fb-subtotal-exclip td { background: #f8fafc; font-weight: 600; color: var(--muted); }
.fb-fx { font-size: 11px; color: var(--muted); margin-top: 10px; font-style: italic; line-height: 1.5; }

/* ─── Per-segment forecast (A + B + C cards) ────────────────────────── */
.seg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.seg-card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.seg-card h3 { font-size: 13px; margin: 0 0 8px 0; color: var(--brand); }
.seg-card .seg-N { font-size: 11px; color: var(--muted); margin-bottom: 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.seg-card .seg-basis, .seg-card .seg-assumptions { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.45; }
.seg-card .seg-range { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.seg-card .seg-range > div { display: flex; justify-content: space-between; padding: 2px 0; }
.seg-card .seg-range .mid { font-weight: 700; color: var(--ink); }
.seg-card .seg-range .lo, .seg-card .seg-range .hi { color: var(--muted); }
.psf-caveat { background: #fef3c7; border-left: 3px solid #d97706; padding: 10px 14px; font-size: 12px; margin-top: 12px; line-height: 1.5; border-radius: 0 4px 4px 0; }
@media (max-width: 700px) { .seg-grid { grid-template-columns: 1fr; } }

/* ─── Detailed evidence block ─────────────────────────────────────────── */
.card.evidence-divider { background: #1d2733; color: white; padding: 16px 24px; border-color: #1d2733; }
.card.evidence-divider .ev-divider-h { color: white; border: none; padding: 0; margin: 0 0 6px 0; font-size: 18px; }
.card.evidence-divider .ev-divider-lead { color: #cbd5e1; margin: 0; font-size: 13px; line-height: 1.55; }
.card.evidence-card { background: var(--card); border-color: var(--line); border-left: 4px solid var(--brand); }
.card.evidence-card h2 { font-size: 16px; }
.card.evidence-card .evidence-lead { color: var(--muted); font-size: 13px; margin: 0 0 14px 0; line-height: 1.55; }
.card.evidence-card .ev-sub-h { font-size: 13px; margin: 16px 0 8px 0; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* Evidence tables (DreamWeb emails + ESET indicators) — compact, mono SHAs */
.evidence-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; table-layout: auto; }
.evidence-table th { background: #f8fafc; padding: 6px 8px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.evidence-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.evidence-table td.mono, .evidence-table th.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.evidence-table td.small, .evidence-table th.small { font-size: 11px; }
.evidence-table td.num { width: 28px; text-align: right; color: var(--muted); }
.evidence-table td.figure, .evidence-table th.figure { text-align: right; white-space: nowrap; }
.evidence-table td.wrap-sha { word-break: break-all; font-size: 10.5px; max-width: 200px; }
.evidence-table td.wrap-file { word-break: break-all; max-width: 280px; }
.evidence-table td.ev-action { background: #ecfdf5; color: #065f46; font-weight: 600; }
.evidence-table td.ev-from-cell { white-space: nowrap; min-width: 180px; }
.evidence-table .ev-from-name { font-size: 10px; opacity: 0.75; }

/* Email-kind pills */
.ev-pill { display: inline-block; padding: 1px 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 2px; margin-top: 4px; line-height: 1.4; }
.ev-pill-imunify           { background: #fef3c7; color: #92400e; }
.ev-pill-ticket-diagnosis  { background: #fecaca; color: #991b1b; }
.ev-pill-ticket-decline    { background: #ddd6fe; color: #5b21b6; }
.ev-pill-ticket-survey     { background: #e5e7eb; color: #374151; }
.ev-row-ticket-diagnosis  td { background: #fff5f5; }

/* Footnote + ESET notes */
.evidence-footnote { background: #f8fafc; border-left: 3px solid var(--brand); padding: 10px 14px; font-size: 12px; margin-top: 14px; color: var(--ink); line-height: 1.55; }
.evidence-notes { margin-top: 14px; font-size: 13px; }
.evidence-notes p { margin: 0 0 8px 0; line-height: 1.55; }
.evidence-notes code { background: #f8fafc; padding: 1px 4px; border-radius: 2px; font-size: 11px; }

/* OSINT cards (one per domain) */
.osint-card { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 16px; background: #fafbfd; }
.osint-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; flex-wrap: wrap; }
.osint-domain { font-size: 15px; font-weight: 600; color: var(--ink); }
.osint-status { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 3px; }
.osint-status-deleted { background: #e5e7eb; color: #374151; }
.osint-status-active  { background: #fecaca; color: #991b1b; }
.osint-status-unknown { background: #dbeafe; color: #1e40af; }
.osint-meta-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
.osint-meta-tbl th { width: 130px; text-align: left; color: var(--muted); font-weight: 500; padding: 3px 6px 3px 0; vertical-align: top; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.osint-meta-tbl td { padding: 3px 0; }
.osint-evidence { background: var(--card); border-left: 3px solid var(--brand); padding: 10px 12px; font-size: 12.5px; line-height: 1.55; margin-bottom: 12px; }
.osint-shots-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin: 8px 0 6px 0; }
.osint-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.osint-figure { margin: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: white; transition: box-shadow 0.15s, transform 0.15s; cursor: zoom-in; }
.osint-figure:hover { box-shadow: 0 4px 14px rgba(37,99,235,0.18); border-color: var(--brand); }
.osint-figure:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.osint-figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; object-position: center; background: #f8fafc; padding: 4px; transition: transform 0.2s; }
.osint-figure:hover img { transform: scale(1.02); }

/* Lightbox modal — click any thumbnail to view full-size */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.92); display: none; align-items: center; justify-content: center; z-index: 9999; padding: 40px 40px 24px 40px; }
.lightbox-overlay.open { display: flex; }
.lightbox-content { max-width: 95vw; max-height: calc(100vh - 80px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox-content img { display: block; max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; background: white; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.lightbox-caption { color: white; background: rgba(0,0,0,0.55); padding: 8px 16px; border-radius: 4px; font-size: 13px; max-width: 100%; text-align: center; line-height: 1.45; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.lightbox-close { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.12); color: white; border: 1px solid rgba(255,255,255,0.3); width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font-family: inherit; }
.lightbox-close:hover, .lightbox-close:focus { background: rgba(255,255,255,0.25); outline: none; }
@media (max-width: 600px) {
  .lightbox-overlay { padding: 16px; }
  .lightbox-content img { max-height: calc(100vh - 100px); }
  .lightbox-close { top: 12px; right: 12px; }
}

/* Email modal — same overlay, different content. The image and email
   slots are mutually exclusive (one is hidden via [hidden]). */
.lightbox-email-content { max-width: 880px; width: 100%; max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.lightbox-email-paper { background: white; border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.lightbox-email-headers { background: #f8fafc; padding: 16px 20px; border-bottom: 1px solid var(--line); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.7; flex: 0 0 auto; }
.lightbox-email-headers table { border-collapse: collapse; width: 100%; }
.lightbox-email-headers th { text-align: left; color: var(--muted); font-weight: 600; padding: 2px 12px 2px 0; vertical-align: top; white-space: nowrap; width: 80px; text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; }
.lightbox-email-headers td { padding: 2px 0; color: var(--ink); word-break: break-word; }
.lightbox-email-headers td.subject { font-weight: 600; }
.lightbox-email-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 22px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; color: var(--ink); }
.lightbox-email-body a { color: var(--brand); text-decoration: underline; word-break: break-all; }
.lightbox-email-anchor { background: #f8fafc; padding: 10px 20px; border-top: 1px solid var(--line); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; color: var(--muted); flex: 0 0 auto; word-break: break-all; line-height: 1.5; }
.lightbox-email-anchor strong { color: var(--ink); }

/* Mailboxes overview table */
.mb-table td.mb-addr { font-weight: 600; color: var(--ink); white-space: nowrap; }
.mb-table tr.mb-attack-target td { background: #fef2f2; border-left: 3px solid var(--danger); }
.mb-table tr.mb-attack-target td.mb-addr { color: var(--danger); }
.mb-table tr.mb-total-row td { background: #f8fafc; font-weight: 700; border-top: 2px solid var(--line); color: var(--ink); padding-top: 10px; padding-bottom: 10px; }
.mb-table tr.mb-total-row td:first-child { text-align: right; }
.mb-table td.mb-note { line-height: 1.45; min-width: 220px; }
.mb-role-pill { display: inline-block; padding: 2px 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 2px; white-space: nowrap; line-height: 1.4; }
.mb-role-owner         { background: #dbeafe; color: #1e40af; }
.mb-role-attack-target { background: var(--danger); color: white; }
.mb-role-family        { background: #fef3c7; color: #92400e; }
.mb-role-staff         { background: #ede9fe; color: #5b21b6; }
.mb-role-role-box      { background: #d1fae5; color: #065f46; }
.mb-role-division      { background: #e0e7ff; color: #3730a3; }
.mb-role-device        { background: #e5e7eb; color: #374151; }
.mb-caveat { margin-top: 12px; line-height: 1.5; }

@media (max-width: 700px) {
  .mb-table td.mb-note { font-size: 11px; min-width: 0; }
  .mb-role-pill { font-size: 9.5px; padding: 1px 6px; }
}

/* Inline email-link buttons inside the facts table */
.fact-emails-row { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.fact-email-btn { background: var(--card); border: 1px solid var(--brand); color: var(--brand); padding: 2px 8px; font-size: 11px; font-family: ui-monospace, "SF Mono", Menlo, monospace; border-radius: 3px; cursor: pointer; line-height: 1.4; }
.fact-email-btn:hover, .fact-email-btn:focus { background: var(--brand); color: white; outline: none; }
.fact-email-btn::before { content: "📧 "; font-size: 10px; }
.facts-table tr.has-email td:first-child::after { content: " ●"; color: var(--brand); font-size: 10px; }

@media (max-width: 700px) {
  .lightbox-email-paper { max-height: calc(100vh - 60px); }
  .lightbox-email-headers th { width: 64px; font-size: 10px; }
  .lightbox-email-body { font-size: 11.5px; padding: 14px 16px; }
}
.osint-caption { padding: 6px 10px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); background: #fafbfd; }
.osint-caption-label { font-weight: 600; color: var(--ink); }

@media (max-width: 700px) {
  .evidence-table { font-size: 11px; }
  .evidence-table td.wrap-sha { max-width: 120px; }
  .evidence-table td.wrap-file { max-width: 160px; }
  .osint-grid { grid-template-columns: 1fr; }
}

/* Legal Notice (Pravna opomena) Styles */
.legal-notice-letter-card { background: #fff8f8; border: 2px solid #e74c3c; border-radius: 12px; padding: 48px; max-width: 900px; margin: 32px auto; box-shadow: 0 10px 25px rgba(231, 76, 60, 0.15); font-family: "Georgia", serif; line-height: 1.6; color: #2c3e50; }
.op-lh { display: flex; flex-direction: column; border-bottom: 3px double #e74c3c; padding-bottom: 20px; margin-bottom: 24px; }
.op-lh-logo-container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.op-lh-logo-title { font-size: 18px; font-weight: bold; text-transform: uppercase; color: #c0392b; font-family: system-ui, sans-serif; letter-spacing: 0.5px; max-width: 60%; line-height: 1.3; }
.op-lh-stamp { border: 3px dashed #c0392b; color: #c0392b; padding: 12px; font-size: 11px; font-weight: bold; border-radius: 8px; font-family: monospace; white-space: pre-line; text-align: center; transform: rotate(-4deg); background: rgba(192, 57, 43, 0.05); box-shadow: 0 0 4px rgba(192, 57, 43, 0.1); }
.op-title { font-size: 24px; color: #c0392b; text-align: center; margin: 24px 0; text-transform: uppercase; font-family: system-ui, sans-serif; font-weight: 800; border-bottom: 1px solid #fadbd8; padding-bottom: 12px; letter-spacing: 0.5px; }
.op-meta { background: #faf0f0; border-left: 4px solid #e74c3c; padding: 16px 20px; margin-bottom: 28px; font-size: 13.5px; font-family: system-ui, sans-serif; border-radius: 0 8px 8px 0; }
.op-meta-row { margin-bottom: 8px; }
.op-meta-row strong { color: #7f8c8d; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; display: inline-block; width: 240px; }
.op-intro { font-weight: bold; margin-bottom: 20px; font-size: 15px; color: #2c3e50; text-transform: uppercase; font-family: system-ui, sans-serif; }
.op-paragraph { margin-bottom: 24px; text-align: justify; text-justify: inter-word; font-size: 15px; }
.op-paragraph strong { display: block; font-size: 15px; color: #c0392b; margin-bottom: 8px; font-family: system-ui, sans-serif; text-transform: uppercase; }
.op-closing { background: #fdf2f2; border: 1px solid #fadbd8; padding: 18px; border-radius: 6px; font-weight: bold; margin: 32px 0; color: #7f0800; font-size: 14.5px; }
.op-signature-block { display: flex; flex-direction: column; align-items: flex-end; margin-top: 40px; padding-right: 20px; }
.op-sig-line { font-weight: bold; font-size: 13px; font-family: system-ui, sans-serif; text-align: right; }
.op-sig-space { margin-top: 15px; font-family: "Signature", "Caveat", "Brush Script MT", cursive; font-size: 26px; color: #2980b9; transform: rotate(-2deg); padding-right: 30px; opacity: 0.85; user-select: none; }
.op-btn-container { text-align: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid #fadbd8; }
.op-btn { background: #e74c3c; color: white; border: none; padding: 16px 32px; font-size: 15px; font-weight: bold; border-radius: 8px; cursor: pointer; transition: background 0.15s, transform 0.1s; text-transform: uppercase; box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3); font-family: system-ui, sans-serif; letter-spacing: 0.5px; }
.op-btn:hover { background: #c0392b; transform: translateY(-1px); }
.op-btn:active { transform: translateY(1px); }

@media (max-width: 700px) {
  .legal-notice-letter-card { padding: 24px; margin: 16px 8px; }
  .op-lh-logo-container { flex-direction: column; align-items: flex-start; }
  .op-lh-logo-title { max-width: 100%; font-size: 15px; }
  .op-lh-stamp { margin-top: 12px; align-self: flex-end; }
  .op-meta-row strong { display: block; width: auto; margin-bottom: 2px; }
  .op-btn { font-size: 13px; padding: 12px 20px; width: 100%; }
}

/* Role-based access control styles */
body.role-stefan .nav-link[href*="pravna-opomena"] { display: none; }
body.role-stefan .role-admin-only { display: none; }
body.role-stefan .role-readonly-banner { display: block; }
.role-readonly-banner { display: none; background: #eff6ff; border-left: 3px solid #2563eb; padding: 10px 14px; margin: 0 24px 16px; font-size: 13px; color: #1e3a8a; border-radius: 4px; }
.role-readonly-banner .role-label { display: inline-block; font-weight: 700; color: #1e3a8a; background: rgba(37, 99, 235, 0.16); padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-right: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
