/* sl-tablet - SecondLife dizajn: svijetle kartice #f5f5f3, crni tekst, Arial 900 kurziv naslovi, ostri kutovi.
   Tamni okvir tableta, akcent: policijsko plava. */
:root {
    --card: #f5f5f3; --card-2: #ebebe8; --card-3: #e2e2de; --white: #fff; --text: #111; --muted: #767676; --line: rgba(0, 0, 0, .13);
    --acc: #1f5fd6; --acc-2: #e8effc; --ok: #1f8a4c; --bad: #d6332a; --warn: #e09a12; --yel: #f2c200; --rail: #111214; --ink: #111;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: transparent; font-family: Arial, Helvetica, sans-serif; color: var(--text); }
body { user-select: none; }
.hidden { display: none !important; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
svg { fill: currentColor; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .25); }
::-webkit-scrollbar-track { background: transparent; }

.label { font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sub { font-size: 11px; color: var(--muted); font-weight: 700; }
.h { font-size: 13px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- tablet ---------- */
#tablet { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8, 9, 12, .45); }
.device {
    position: relative; width: min(1320px, 95vw); aspect-ratio: 16 / 10; max-height: 93vh;
    background: linear-gradient(145deg, #2a2b2f, #0d0e10 60%); padding: 18px; border-radius: 4px;
    box-shadow: 0 0 0 1px #3a3b40 inset, 0 2.2rem 5rem rgba(0, 0, 0, .65);
    animation: up .45s cubic-bezier(.22, 1, .36, 1) both;
}
.device.out { animation: down .25s ease-in both; }
@keyframes up { from { opacity: 0; transform: translateY(60px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes down { to { opacity: 0; transform: translateY(60px) scale(.97); } }
.cam { position: absolute; top: 7px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #2c3e5c; box-shadow: 0 0 0 2px #050505; }
.screen { width: 100%; height: 100%; display: grid; grid-template-columns: 196px 1fr; background: var(--card-2); overflow: hidden; }

/* ---------- lijevi meni ---------- */
.rail { background: var(--rail); color: #fff; display: flex; flex-direction: column; min-height: 0; }
.logo { display: flex; align-items: center; gap: 10px; padding: 18px 16px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.shield { width: 38px; height: 38px; display: grid; place-items: center; background: var(--acc); flex-shrink: 0; }
.shield svg { width: 22px; height: 22px; fill: #fff; }
.logo b { display: block; font-size: 17px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; }
.logo span { font-size: 9px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: #8b8d93; }
#nav { display: flex; flex-direction: column; padding: 10px 0; gap: 2px; flex: 1; overflow-y: auto; }
#nav button { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 18px; border: 0; background: transparent; color: #a9abb1; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
#nav button svg { width: 18px; height: 18px; flex-shrink: 0; }
#nav button:hover { color: #fff; background: rgba(255, 255, 255, .05); }
#nav button.on { color: #fff; background: rgba(31, 95, 214, .22); box-shadow: inset 3px 0 0 var(--acc); }
#nav button i { margin-left: auto; font-style: normal; font-size: 10px; min-width: 18px; padding: 2px 5px; text-align: center; background: var(--bad); color: #fff; }
#nav button i:empty { display: none; }
.duty { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 8px; }
.duty .dunit { display: flex; align-items: center; gap: 10px; }
.duty .cs { min-width: 46px; height: 38px; padding: 0 6px; display: grid; place-items: center; background: #fff; color: var(--text); font-size: 14px; font-weight: 900; font-style: italic; }
.duty b { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; line-height: 1.15; }
.duty span { font-size: 10px; color: #8b8d93; font-weight: 700; }
.duty select { width: 100%; background: #1d1e22; border: 1px solid #2d2f35; color: #fff; padding: 8px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; outline: none; }

/* ---------- glavni dio ---------- */
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 18px; padding: 14px 22px; background: var(--card); border-bottom: 1px solid var(--line); }
.ttl { flex: 1; min-width: 0; }
.ttl h1 { margin: 2px 0 0; font-size: 28px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; }
.btn-remote { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 8px 12px; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.btn-remote:hover { background: var(--acc); color: #fff; border-color: var(--acc); }
#rmQr { display: grid; place-items: center; margin: 8px 0; }
#rmQr svg { width: 196px; height: 196px; background: #fff; padding: 8px; }
#rmCode { text-align: center; font-size: 28px; font-weight: 900; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.rm-ok { text-align: center; padding: 28px 8px 12px; }
.rm-ok b { display: block; font-size: 22px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .04em; color: var(--ok); }
.rm-ok .mark { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 28px; font-weight: 900; }
.rm-ok .sub { display: block; margin-top: 8px; line-height: 1.45; }
.me { display: flex; align-items: center; gap: 10px; padding-right: 18px; border-right: 1px solid var(--line); }
.me .av { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 900; font-style: italic; font-size: 13px; }
.me b { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.clock { text-align: right; }
.clock b { display: block; font-size: 22px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; line-height: 1; }
.clock span { font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.x { width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 900; }
.x:hover { background: var(--ink); color: #fff; }
#view { flex: 1; min-height: 0; overflow: hidden; display: flex; }
.page { flex: 1; min-width: 0; min-height: 0; padding: 18px 22px; overflow-y: auto; animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- osnovni elementi ---------- */
.card { background: var(--card); border: 1px solid var(--line); }
.card > .ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.card > .cb { padding: 12px 14px; }
.btn { border: 0; background: var(--ink); color: #fff; padding: 10px 16px; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:hover { background: #333; }
.btn.acc { background: var(--acc); } .btn.acc:hover { background: #184eb3; }
.btn.bad { background: var(--bad); } .btn.bad:hover { background: #b0261e; }
.btn.ok { background: var(--ok); }
.btn:disabled { background: #bbb; cursor: default; }
.mini { border: 1px solid var(--line); background: var(--white); padding: 6px 9px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.mini:hover { background: var(--ink); color: #fff; border-color: var(--text); }
.mini.bad:hover { background: var(--bad); border-color: var(--bad); }
.mini.acc { border-color: var(--acc); color: var(--acc); } .mini.acc:hover { background: var(--acc); color: #fff; }
.in, .sel, .ta { width: 100%; border: 1px solid var(--line); background: var(--white); padding: 10px 12px; font-size: 13px; font-weight: 700; outline: none; user-select: text; }
.in:focus, .sel:focus, .ta:focus { border-color: var(--text); }
.ta { resize: vertical; min-height: 90px; line-height: 1.5; font-weight: 400; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: var(--muted); }
.search .in { padding-left: 34px; }
.empty { padding: 18px; text-align: center; border: 1px dashed var(--line); color: var(--muted); font-weight: 700; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; background: var(--card-3); color: var(--text); white-space: nowrap; }
.chip.bad { background: var(--bad); color: #fff; } .chip.ok { background: var(--ok); color: #fff; }
.chip.warn { background: var(--warn); color: #fff; } .chip.acc { background: var(--acc); color: #fff; }
.chip.dark { background: var(--ink); color: #fff; } .chip.line { background: transparent; border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.on { background: #2fbf5a; box-shadow: 0 0 0 3px rgba(47, 191, 90, .2); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 0; border: 1px solid var(--line); background: var(--white); }
.tabs button { border: 0; background: transparent; padding: 8px 14px; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tabs button.on { background: var(--ink); color: #fff; }
.plate { display: inline-block; font-family: 'Arial Narrow', Arial, sans-serif; font-weight: 900; font-size: 13px; letter-spacing: .12em; padding: 3px 8px; background: #fff; border: 2px solid var(--text); box-shadow: inset 4px 0 0 var(--acc); padding-left: 10px; text-transform: uppercase; }
.plate.big { font-size: 24px; padding: 6px 14px 6px 18px; box-shadow: inset 8px 0 0 var(--acc); }
a.lnk, .lnk { color: var(--acc); font-weight: 900; cursor: pointer; text-decoration: none; }
.lnk:hover { text-decoration: underline; }

/* ---------- pregled ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: transform .12s; }
.stat:hover { transform: translateY(-2px); }
.stat .ic { width: 42px; height: 42px; display: grid; place-items: center; background: var(--ink); color: #fff; flex-shrink: 0; }
.stat .ic svg { width: 22px; height: 22px; }
.stat.blue .ic { background: var(--acc); } .stat.red .ic { background: var(--bad); } .stat.yel .ic { background: var(--warn); }
.stat b { display: block; font-size: 30px; font-weight: 900; font-style: italic; line-height: 1; }
.dash { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; }
.dash .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--card); cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--white); }
.li b { font-size: 12px; font-weight: 900; text-transform: uppercase; }
.code { min-width: 52px; padding: 5px 6px; text-align: center; font-size: 11px; font-weight: 900; font-style: italic; color: #fff; background: var(--muted); }

/* ---------- osobe / vozila / izvjestaji: lista + detalj ---------- */
.split { flex: 1; display: grid; grid-template-columns: 330px 1fr; min-height: 0; }
.split > .left { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.split > .left .lhead { padding: 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.split > .left .list { flex: 1; overflow-y: auto; }
.split > .right { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 22px; }
.res { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.res:hover { background: var(--white); }
.res.on { background: var(--white); box-shadow: inset 3px 0 0 var(--acc); }
.res b { display: block; font-size: 13px; font-weight: 900; text-transform: uppercase; }
.thumb { width: 40px; height: 48px; flex-shrink: 0; background: var(--card-3) center / cover no-repeat; display: grid; place-items: center; color: #aaa; }
.thumb svg { width: 24px; height: 24px; }
.placeholder { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; height: 100%; }
.placeholder svg { width: 64px; height: 64px; fill: var(--card-3); }

.profile { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--line); padding: 16px; }
.mug { width: 150px; height: 186px; background: var(--card-3) center / cover no-repeat; display: grid; place-items: center; color: #b5b5b0; position: relative; }
.mug svg { width: 80px; height: 80px; }
.mug .board { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-align: center; padding: 4px; }
.pname { font-size: 30px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; letter-spacing: -.02em; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; margin-top: 12px; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts b { font-size: 13px; font-weight: 900; }
.pactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; color: #fff; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.pgrid .full { grid-column: 1 / -1; }
.lic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lic div { white-space: nowrap; padding: 8px 10px; background: var(--white); border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.lic div.no { color: #aaa; background: transparent; }
.lic div.ban { border-color: var(--bad); color: var(--bad); }
.pts { display: flex; gap: 3px; margin-top: 8px; }
.pts i { flex: 1; height: 10px; background: var(--card-3); }
.pts i.on { background: var(--bad); }
.rec { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.rec:hover { background: var(--white); }
.rec:last-child { border-bottom: 0; }
.rec .chs { display: flex; flex-wrap: wrap; gap: 4px; }
.note { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.45; display: flex; gap: 10px; }
.note p { margin: 0 0 4px; user-select: text; white-space: pre-wrap; }
.sum { display: flex; gap: 16px; padding: 10px 14px; background: var(--ink); color: #fff; }
.sum b { font-size: 16px; font-weight: 900; font-style: italic; }
.sum .label { color: #999; }

/* ---------- izvjestaj ---------- */
.rform { display: flex; flex-direction: column; gap: 14px; }
.fgrid { display: grid; grid-template-columns: 1fr 220px; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.suspect { background: var(--card); border: 1px solid var(--line); }
.suspect .sh { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.charge { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.charge .cc { font-size: 10px; font-weight: 900; color: var(--muted); width: 42px; }
.charge b { font-weight: 900; }
.cnt { display: flex; align-items: center; border: 1px solid var(--line); background: var(--white); }
.cnt button { width: 24px; height: 24px; border: 0; background: transparent; font-weight: 900; }
.cnt button:hover { background: var(--ink); color: #fff; }
.cnt span { width: 24px; text-align: center; font-weight: 900; font-size: 12px; }
.tot { display: flex; gap: 18px; align-items: center; padding: 10px 14px; background: var(--card-2); }
.tot b { font-size: 18px; font-weight: 900; font-style: italic; }
.officers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.officers .chip { font-size: 10px; padding: 5px 8px; }
.officers .chip button { border: 0; background: transparent; color: inherit; font-weight: 900; padding: 0 0 0 4px; }
.rview { background: var(--card); border: 1px solid var(--line); padding: 16px; white-space: pre-wrap; font-size: 13px; line-height: 1.55; user-select: text; }

/* ---------- potjernice / bolo ---------- */
.cards2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wcard { background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.wcard .wt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.wcard .wt .thumb { width: 44px; height: 54px; }
.wcard .wb { padding: 10px 14px; font-size: 12px; line-height: 1.5; flex: 1; white-space: pre-wrap; }
.wcard .wf { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--card-2); }
.wcard.red { box-shadow: inset 4px 0 0 var(--bad); }
.wcard.yel { box-shadow: inset 4px 0 0 var(--warn); }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

/* ---------- dispecer ---------- */
.disp { flex: 1; display: grid; grid-template-columns: 300px 1fr 280px; min-height: 0; }
.disp .colA, .disp .colC { background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.disp .colA { border-right: 1px solid var(--line); }
.disp .colC { border-left: 1px solid var(--line); }
.disp .sec { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.disp .scroll { flex: 1; overflow-y: auto; min-height: 0; }
.alert { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 6px; position: relative; }
.alert:hover, .alert.on { background: var(--white); }
.alert.on { box-shadow: inset 3px 0 0 var(--acc); }
.alert .at { display: flex; align-items: center; gap: 8px; }
.alert b { font-size: 12px; font-weight: 900; text-transform: uppercase; }
.alert .acts { display: flex; gap: 6px; }
.alert.new { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { background: #fff3c4; } }
.unit { display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.unit:hover { background: var(--white); }
.unit .cs { min-width: 40px; padding: 4px 5px; text-align: center; background: var(--ink); color: #fff; font-weight: 900; font-style: italic; font-size: 11px; }
.unit b { font-weight: 900; text-transform: uppercase; font-size: 11px; }
.st { font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; }
.st.s0 { background: #d8f0df; color: var(--ok); } .st.s1 { background: #fde9c5; color: #9a6400; } .st.s2 { background: #dbe6fb; color: var(--acc); } .st.s3 { background: var(--card-3); color: var(--muted); }
.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; border-top: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { font-size: 12px; line-height: 1.4; }
.msg b { display: block; font-size: 10px; font-weight: 900; text-transform: uppercase; color: var(--acc); }
.msg.mine b { color: var(--text); }
.msg p { margin: 2px 0 0; background: var(--white); border: 1px solid var(--line); padding: 6px 9px; user-select: text; word-wrap: break-word; }
.chatin { display: flex; border-top: 1px solid var(--line); }
.chatin input { flex: 1; border: 0; padding: 11px 12px; font-size: 12px; font-weight: 700; outline: none; background: var(--white); }
.chatin button { border: 0; background: var(--acc); color: #fff; padding: 0 14px; font-weight: 900; font-size: 11px; text-transform: uppercase; }

.map { position: relative; overflow: hidden; background: #0e1f2e; cursor: grab; }
.map.drag { cursor: grabbing; }
.map .inner { position: absolute; left: 0; top: 0; width: 1024px; height: 1024px; transform-origin: 0 0; }
.map .inner img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.mk { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.mk .pin { width: 12px; height: 12px; border-radius: 50%; background: var(--acc); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.mk.me .pin { background: var(--yel); }
.mk .lab { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 9px; font-weight: 900; color: #fff; background: rgba(0, 0, 0, .75); padding: 1px 4px; white-space: nowrap; }
.mk.al .pin { width: 16px; height: 16px; border-radius: 0; transform: rotate(45deg); background: var(--bad); }
.mk.al .ring { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid var(--bad); border-radius: 50%; animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
.mapctl { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.mapctl button { width: 34px; height: 34px; border: 0; background: var(--card); font-weight: 900; font-size: 16px; }
.mapctl button:hover { background: var(--ink); color: #fff; }
.maplegend { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }
.maplegend span { background: rgba(17, 18, 20, .85); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; display: flex; align-items: center; gap: 6px; }

/* ---------- zakon ---------- */
.penal { display: flex; flex-direction: column; gap: 14px; }
.pen { display: grid; grid-template-columns: 56px 1fr 110px 90px 90px; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12px; background: var(--card); }
.pen:last-child { border-bottom: 0; }
.pen.pick { cursor: pointer; }
.pen.pick:hover { background: var(--white); }
.pen .cc { font-weight: 900; color: var(--muted); font-size: 11px; }
.pen b { font-weight: 900; }
.pen .num { text-align: right; font-weight: 900; font-style: italic; }

/* ---------- modal ---------- */
#modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8, 9, 12, .55); z-index: 20; }
.mbox { width: min(560px, 92vw); max-height: 86vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .5); animation: fade .2s ease both; }
.mbox.wide { width: min(860px, 94vw); }
.mbox .mh { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mbox .mh h3 { margin: 2px 0 0; font-size: 20px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; }
.mbox .mb { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.mbox .mf { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--card-2); }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; }
.tagpick button { border: 2px solid var(--line); background: var(--white); padding: 6px 10px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.seg { display: flex; border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: var(--white); padding: 10px; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.seg button.on { background: var(--ink); color: #fff; }

/* ---------- obavijesti dispecera ---------- */
#toasts { position: fixed; right: 22px; top: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 30; width: 340px; pointer-events: none; }
.toast { display: flex; background: var(--card); border: 1px solid var(--line); box-shadow: 0 .8rem 2.2rem rgba(0, 0, 0, .35); animation: tin .4s cubic-bezier(.22, 1, .36, 1) both; overflow: hidden; }
.toast.out { animation: tout .35s ease-in both; }
@keyframes tin { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateX(110%); } }
.toast .tc { width: 70px; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 900; font-style: italic; flex-shrink: 0; }
.toast .tb { padding: 10px 12px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.toast .tb b { font-size: 14px; font-weight: 900; font-style: italic; text-transform: uppercase; }
.toast .tb .key { margin-top: 4px; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toast .tb .key i { font-style: normal; background: var(--ink); color: #fff; padding: 1px 5px; margin-right: 4px; }
.toast .bar { position: absolute; }
.toast.p1 .tc { animation: blink 1s steps(2) 4; }
@keyframes blink { 50% { filter: brightness(1.6); } }
/* dok je tablet otvoren obavijesti idu dolje desno (ne pokrivaju gumb za zatvaranje) */
body.tab-open #toasts { top: auto; bottom: 22px; flex-direction: column-reverse; }

@keyframes pulse { 50% { opacity: .45; } }

/* ---------- prijava / registracija ---------- */
#auth { position: absolute; inset: 18px; z-index: 8; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, #1b2f57 0%, #0d1424 60%, #07090f 100%); animation: fade .3s ease both; }
.abox { width: min(440px, 90%); background: var(--card); border: 1px solid var(--line); box-shadow: 0 1.4rem 3.5rem rgba(0, 0, 0, .55); }
.ahead { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ahead h2 { margin: 3px 0 0; font-size: 28px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; }
.abody { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
#auForm { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.abody .btn { justify-content: center; padding: 13px; font-size: 12px; }
.aof { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); }
.aof .av { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 900; font-style: italic; }
.aof b { display: block; font-size: 13px; font-weight: 900; text-transform: uppercase; }
.anote { margin: 0; font-size: 12px; line-height: 1.5; color: #444; border-left: 3px solid var(--acc); padding: 2px 0 2px 10px; }
.aerr { min-height: 16px; font-size: 12px; font-weight: 900; color: var(--bad); }
.aerr:empty { min-height: 0; }
.afoot { text-align: center; }
.logout { width: 100%; border: 1px solid #2d2f35; background: transparent; color: #a9abb1; padding: 8px; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.logout:hover { background: var(--bad); border-color: var(--bad); color: #fff; }

.swatch { display: inline-block; width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .3); }

/* ---------- pritvor ---------- */
.cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cellc { background: var(--card); border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; box-shadow: inset 3px 0 0 var(--ok); }
.cellc b { font-size: 20px; font-weight: 900; font-style: italic; }
.cellc.full { box-shadow: inset 3px 0 0 var(--bad); }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.chk.off { opacity: .45; }
.chk input { width: 16px; height: 16px; accent-color: var(--acc); }
button.chip.pick { border: 1px solid var(--line); cursor: pointer; padding: 6px 10px; font-size: 10px; }
button.chip.pick:hover { border-color: var(--text); }

/* ---------- smjena ---------- */
.roster { display: grid; grid-template-columns: 1.6fr .7fr 1.1fr .8fr .8fr .9fr .9fr .8fr .7fr; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.roster b { font-weight: 900; text-transform: uppercase; }
.roster.rhead { background: var(--card-2); padding: 8px 14px; }
.roster.mine { box-shadow: inset 3px 0 0 var(--acc); background: var(--white); }
.roster .badge { font-weight: 900; font-style: italic; }

/* ---------- patrole ---------- */
.pgrid2 { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.wcard.mine { box-shadow: inset 4px 0 0 var(--acc); }
.cs-mini { min-width: 38px; padding: 3px 5px; text-align: center; background: var(--ink); color: #fff; font-weight: 900; font-style: italic; font-size: 10px; }

/* ---------- video nadzor ---------- */
.camgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.camc { background: var(--card); border: 1px solid var(--line); }
.camv { position: relative; aspect-ratio: 16 / 9; background: repeating-linear-gradient(0deg, #1b1d20 0 2px, #222428 2px 4px); display: grid; place-items: center; color: #4c5057; cursor: pointer; }
.camv svg { width: 40px; height: 40px; }
.camv:hover { color: #9aa0a8; }
.camv .rec { position: absolute; left: 8px; top: 6px; font-size: 9px; font-weight: 900; color: #e5484d; letter-spacing: .1em; }
.camv .camn { position: absolute; right: 8px; top: 6px; font-size: 9px; font-weight: 900; color: #cfd3d8; letter-spacing: .1em; }
#cctv { position: fixed; inset: 0; z-index: 50; pointer-events: none; color: #fff; font-family: 'Courier New', monospace; text-shadow: 0 0 4px rgba(0, 0, 0, .9); }
#cctv .cc-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); box-shadow: inset 0 0 18vh rgba(0, 0, 0, .75); }
#cctv .cc-tl { position: absolute; left: 34px; top: 28px; display: flex; flex-direction: column; gap: 4px; }
#cctv .cc-tr { position: absolute; right: 34px; top: 28px; text-align: right; display: flex; flex-direction: column; gap: 4px; }
#cctv b { font-size: 22px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
#cctv span { font-size: 14px; letter-spacing: .08em; }
#cctv .cc-rec { color: #ff4d4d; font-weight: 900; animation: blink 1.2s steps(2) infinite; }
#cctv .cc-bot { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; gap: 22px; font-family: Arial, sans-serif; text-shadow: none; }
#cctv .cc-bot span { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; background: rgba(0, 0, 0, .55); padding: 6px 10px 6px 6px; }
#cctv kbd { background: #fff; color: #111; padding: 2px 6px; font-family: Arial, sans-serif; font-weight: 900; font-size: 10px; }

/* ---------- fotografije ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { position: relative; background: #fff; border: 1px solid var(--line); padding: 6px 6px 8px; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo span { display: block; margin-top: 6px; font-size: 10px; font-weight: 900; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo .mini { position: absolute; right: 10px; top: 10px; }
.printer-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
.myph { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 8px; max-height: 360px; overflow-y: auto; }
.mph { background: #fff; border: 1px solid var(--line); padding: 4px; cursor: grab; }
.mph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; pointer-events: none; }
.mph:hover { border-color: var(--text); }
.mph.ghost { position: fixed; z-index: 90; width: 90px; pointer-events: none; transform: rotate(-6deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.printer { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 14px; border: 2px dashed var(--line); }
.printer.over { border-color: var(--acc); background: var(--acc-2); }
.pr-top { width: 150px; height: 14px; background: #2b2d31; }
.pr-body { width: 200px; height: 74px; background: linear-gradient(#3a3d42, #25272b); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; position: relative; }
.pr-body b { font-size: 16px; font-weight: 900; font-style: italic; letter-spacing: .08em; }
.pr-led { position: absolute; right: 12px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: #2fbf5a; }
.printer.working .pr-led { background: #f2c200; animation: blink .4s steps(2) infinite; }
.pr-slot { width: 170px; height: 120px; overflow: hidden; display: flex; justify-content: center; margin-bottom: 10px; }
.pr-paper { width: 140px; height: 110px; background: #fff center / cover no-repeat; border: 6px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); transform: translateY(-120%); }
.pr-paper.out { animation: paper 1.1s ease-out forwards; }
@keyframes paper { from { transform: translateY(-120%); } to { transform: translateY(0); } }
.pgrid2 .fgrid { grid-template-columns: 1fr 1fr; }

/* ---------- sluzbena znacka dolje lijevo ---------- */
.bcard { display: flex; align-items: center; gap: 11px; padding: 10px; cursor: pointer; background: linear-gradient(135deg, #1a2236, #121418); border: 1px solid #2a3350; }
.bcard:hover { border-color: var(--acc); }
.bshield { width: 40px; height: 46px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(160deg, #e7c45a, #a8822a); clip-path: polygon(50% 0, 100% 14%, 100% 60%, 50% 100%, 0 60%, 0 14%); }
.bshield svg { width: 24px; height: 24px; fill: #3a2c08; }
.bcard .bno { display: block; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #e7c45a; }
.bcard b { display: block; font-size: 13px; font-weight: 900; font-style: italic; text-transform: uppercase; color: #fff; line-height: 1.15; }
.bcard .bduty { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; color: #8b8d93; margin-top: 2px; }
.roster .badge.edit { cursor: pointer; color: var(--acc); }
.roster .badge.edit:hover { text-decoration: underline; }
.bcard .bno, .bcard .bduty { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard { padding: 9px 8px; gap: 9px; }
.bshield { width: 34px; height: 40px; }
.bshield svg { width: 20px; height: 20px; }

/* ---------- dosje: svjedoci ---------- */
.wit { padding: 8px 10px; background: var(--white); border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; font-size: 12px; }
.wit b { font-weight: 900; text-transform: uppercase; }
#mbox .wit { margin-top: 4px; }

.wpbox { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); }
.wpbox b { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; }
