/* EOOSK Objekti: zajednički stil. Tamna petrol-plava paleta, Segoe UI.
   Vizuelni koncept 15: diskretni tonovi tehničkih celina, Lucide ikonice i jednokratne mikroanimacije. */
@property --tint { syntax: '<percentage>'; inherits: true; initial-value: 5%; }
:root {
    --bg: #0d1820;
    --surface: #132733;
    --surface-2: #183140;
    --field: #0f212b;
    --line: #26434f;
    --line-soft: #1f3a46;
    --line-strong: #3a5d6e;
    --text: #eaf2f6;
    --muted: #a3b7c2;
    --faint: #8299a5;
    --accent: #74b9d8;
    --primary: #245f7a;
    --primary-hover: #2b6f8e;
    --primary-line: #4d93b1;
    --danger: #8a3640;
    --danger-hover: #9d404b;
    --danger-line: #c0606c;
    --danger-text: #f2b8bf;
    --success: #7fd1a6;
    --amber: #d9ad55;
    --radius: 10px;
    --radius-sm: 7px;
    --header-h: 56px;

    /* Tonovi celina: ista svetlina i zasićenost (OKLCH), razlikuje se samo ton. */
    --t-meter: oklch(0.80 0.095 200);
    --t-pump: oklch(0.80 0.095 162);
    --t-elec: oklch(0.84 0.105 82);
    --t-tech: oklch(0.78 0.090 278);
    --t-photo: oklch(0.78 0.075 318);
    --t-docs: oklch(0.78 0.090 245);
    --t-build: oklch(0.80 0.030 70);
    --t-notes: oklch(0.78 0.028 232);

    --fast: 150ms;
    --ease-out: cubic-bezier(.2, .7, .2, 1);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 56px); }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    font: 15px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}
main { flex: 1; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
h1 { font: 650 26px/1.2 "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; letter-spacing: -.012em; margin: 0; }
h2 { font-size: 16.5px; font-weight: 650; margin: 0; }
p { margin: 0 0 10px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 8px 12px; background: var(--primary); color: var(--text); border-radius: 6px; }
.skip-link:focus { top: 8px; }
.icon { width: 18px; height: 18px; flex: none; overflow: visible; }

/* ===== Tonovi celina =====
   data-tone postavlja --c; komponente ga koriste za pozadinu (5 %), ivicu i ikonicu. */
:where(.section, .admin-card, fieldset, .jump a, .missing-row a, .missing-row .chip, [data-tone]) { --c: var(--accent); }
[data-tone="meter"] { --c: var(--t-meter); }
[data-tone="pump"] { --c: var(--t-pump); }
[data-tone="elec"] { --c: var(--t-elec); }
[data-tone="tech"] { --c: var(--t-tech); }
[data-tone="photo"] { --c: var(--t-photo); }
[data-tone="docs"] { --c: var(--t-docs); }
[data-tone="build"] { --c: var(--t-build); }
[data-tone="notes"] { --c: var(--t-notes); }

/* ===== Zaglavlje ===== */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: rgb(16 33 43 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .01em; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; object-fit: contain; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.2; }
.nav { display: flex; gap: 2px; align-self: stretch; align-items: center; }
.nav a { position: relative; color: var(--muted); padding: 8px 12px; border-radius: 6px; font-weight: 600; transition: color var(--fast), background-color var(--fast); }
.nav a:hover { text-decoration: none; color: var(--text); background: rgb(116 185 216 / .07); }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -9px; height: 2px; border-radius: 2px; background: var(--accent); }
.account { margin-left: auto; position: relative; }
.account summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; max-width: 280px;
    transition: border-color var(--fast), background-color var(--fast);
}
.account summary::-webkit-details-marker { display: none; }
.account summary::after { content: ""; flex: none; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate var(--fast), translate var(--fast); }
.account[open] summary::after { rotate: 225deg; translate: 0 2px; }
.account summary:hover { border-color: var(--line-strong); background: rgb(116 185 216 / .06); }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: color-mix(in oklab, var(--accent) 18%, var(--surface)); color: var(--text); }
.account .full { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-panel {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 40;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 16px 36px #0009; padding: 6px; display: grid; animation: pop 140ms var(--ease-out);
}
@keyframes pop { from { opacity: 0; translate: 0 -4px; } }
.account-name { margin: 0; padding: 8px 10px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-panel a, .account-panel button {
    display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px;
    color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; transition: background-color var(--fast);
}
.account-panel a:hover, .account-panel button:hover { background: var(--surface-2); text-decoration: none; }
.account-panel form { margin: 0; }

.page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 18px 20px 48px; }
.page.narrow, .page.form-page.narrow { max-width: 640px; }
.dev-footer { text-align: center; color: var(--faint); font-size: 12px; padding: 10px; border-top: 1px dashed var(--line); }

/* ===== Dugmad ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
    transition: background-color var(--fast), border-color var(--fast), box-shadow var(--fast), scale 90ms;
}
.btn:hover { border-color: var(--primary-line); background: #1c3a4a; text-decoration: none; }
.btn:active { scale: .98; }
.btn-primary { background: var(--primary); border-color: var(--primary-line); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 0 0 3px rgb(77 147 177 / .16); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); padding: 0 10px; box-shadow: none; }
.btn-ghost:hover { background: rgb(116 185 216 / .08); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-line); box-shadow: 0 0 0 3px rgb(192 96 108 / .18); }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn .icon { width: 17px; height: 17px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; cursor: default; pointer-events: none; }
.btn[data-wide] { width: 100%; min-height: 46px; }
.icon-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
    border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer;
    transition: color var(--fast), background-color var(--fast), border-color var(--fast);
}
.icon-btn:hover { color: var(--text); background: rgb(116 185 216 / .08); }
.icon-btn .icon { width: 17px; height: 17px; }
.copy { width: 30px; height: 30px; opacity: .7; }
.copy:hover { opacity: 1; }
.copied { color: var(--success) !important; opacity: 1; }

/* ===== Oznake i obaveštenja ===== */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-amber { border-color: #8d7136; color: var(--amber); background: rgb(217 173 85 / .06); }
.tag-muted { color: var(--faint); border-color: var(--line); }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.notice { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 14px; border: 1px solid var(--line-strong); background: var(--surface); }
.notice p { margin: 0; }
.notice-success { border-color: #3f7a5c; background: #12302a; }
.notice-error { border-color: var(--danger-line); background: #2c1a20; }
.notice-info { border-color: var(--primary-line); background: #173a4a; }
.empty-state { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state p { margin: 0; }

/* ===== Naslovi stranica ===== */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .btn { margin-left: auto; }
.crumbs { font-size: 14px; margin-bottom: 8px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.crumbs .icon { width: 16px; height: 16px; }
.lead { color: var(--muted); margin: 0 0 16px; }

/* ===== Katalog ===== */
.toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 230px; gap: 10px; align-items: center; margin-bottom: 10px; }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--faint); pointer-events: none; transition: color var(--fast); }
.search:focus-within .icon { color: var(--accent); }
.search input, .type-filter select {
    width: 100%; height: 42px; padding: 0 12px 0 40px;
    background: var(--field); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit;
    transition: border-color var(--fast), box-shadow var(--fast);
}
.type-filter select { padding-left: 12px; }
.search input:hover, .type-filter select:hover { border-color: #46707f; }
.search input:focus, .type-filter select:focus { outline: none; border-color: var(--primary-line); box-shadow: 0 0 0 3px rgb(77 147 177 / .2); }
.result-count { color: var(--muted); font-size: 14px; margin: 0 0 8px; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
table.catalog { width: 100%; border-collapse: collapse; table-layout: fixed; }
.catalog col.c-name { width: 23%; }
.catalog col.c-type { width: 16%; }
.catalog col.c-place { width: 16%; }
.catalog col.c-map { width: 110px; }
.catalog thead th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: #10212b; border-bottom: 1px solid var(--line); }
.catalog thead th.map-head { text-align: right; padding-right: 24px; }
.catalog tbody td, .catalog tbody th { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; text-align: left; overflow-wrap: anywhere; }
.catalog tbody tr:last-child > * { border-bottom: 0; }
.catalog tbody tr { cursor: pointer; transition: background-color var(--fast), box-shadow var(--fast); }
.catalog tbody tr:hover { background: rgb(116 185 216 / .055); box-shadow: inset 3px 0 0 var(--accent); }
.catalog tbody th { font-weight: 650; font-size: 15px; }
.catalog tbody th a { color: var(--text); }
.catalog .address { color: #d3e0e7; }
.catalog .map-cell { text-align: right; }
.catalog .inline-tag { display: none; }
/* Tip objekta: ista oznaka za sve tipove. */
.type-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgb(255 255 255 / .02); color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: border-color var(--fast), color var(--fast), background-color var(--fast); }
.catalog tbody tr:hover .type-tag { border-color: #3d6577; color: #c7d8e0; background: rgb(116 185 216 / .06); }
.map-link {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px 0 9px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--accent); font-weight: 600; font-size: 13px;
    transition: border-color var(--fast), background-color var(--fast);
}
.map-link .icon { width: 16px; height: 16px; }
.map-link:hover { text-decoration: none; border-color: var(--primary-line); background: rgb(116 185 216 / .08); }
.map-none { color: var(--faint); padding-right: 14px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.pagination .pages { display: flex; gap: 6px; }

/* Katalog kao složeni redovi na tabletu i telefonu */
@media (max-width: 1000px) {
    table.catalog, .catalog tbody { display: block; }
    .catalog colgroup, .catalog thead { display: none; }
    .catalog tbody tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name map" "where map";
        column-gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft);
    }
    .catalog tbody tr:last-child { border-bottom: 0; }
    .catalog tbody tr > * { padding: 0; border: 0; background: none; }
    .catalog tbody th { grid-area: name; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 16px; }
    .catalog .inline-tag { display: inline-block; }
    .catalog td.type { display: none; }
    .catalog td.place, .catalog td.address { grid-area: where; font-size: 14px; color: var(--muted); align-self: start; }
    .catalog td.place { grid-row: 2; grid-column: 1; }
    .catalog td.address { grid-row: 3; grid-column: 1; }
    .catalog td.address:empty { display: none; }
    .catalog .map-cell { grid-area: map; grid-row: 1 / span 3; align-self: center; }
    .map-link { height: 42px; padding: 0 12px 0 10px; }
}

/* ===== Karton: kompaktno zaglavlje ===== */
.object-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 2px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.object-head h1 { font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
.object-head .back { margin-left: -6px; color: var(--accent); }
.object-head .back .icon { width: 19px; height: 19px; }
/* Razdelnik stoji levo od svakog podatka; na početku reda ga odseca clip-path, pa preloman red ne počinje crtom. */
.facts { --pad: 0px; --sep: 12px; grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px calc(var(--sep) * 2 + 1px); margin: 0; padding-left: var(--pad); clip-path: inset(-6px -6px -6px var(--pad)); color: var(--muted); font-size: 14.5px; }
.has-back .facts { --pad: 34px; }
.facts > span { position: relative; display: inline-flex; align-items: center; }
.facts > span::before { content: ""; position: absolute; left: calc(var(--sep) * -1 - 1px); top: 50%; width: 1px; height: 14px; translate: 0 -50%; background: var(--line-strong); }
.facts strong { color: var(--text); font-weight: 600; }
.facts .coords { color: var(--faint); font-size: 13.5px; }
.object-head .actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.compact-head { display: none; }
.jump { display: none; }

.card-grid { display: grid; grid-template-columns: minmax(330px, 384px) minmax(0, 1fr); gap: 18px; align-items: start; }
.card-col { display: grid; gap: 18px; min-width: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; min-width: 0; }

/* ===== Celina kartona ===== */
.section {
    --tint: 5%;
    background:
        linear-gradient(180deg, rgb(255 255 255 / .022), transparent 96px),
        color-mix(in oklab, var(--c) var(--tint), var(--surface));
    border: 1px solid color-mix(in oklab, var(--c) 14%, var(--line)); border-radius: var(--radius); min-width: 0;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .035), 0 12px 26px -18px rgb(0 0 0 / .8);
    transition: --tint var(--fast) ease, border-color var(--fast) ease;
}
.can-hover .section:hover, .section.tap { --tint: 8.5%; border-color: color-mix(in oklab, var(--c) 28%, var(--line)); }
.section-head {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 12px; min-height: 50px;
    border-bottom: 1px solid color-mix(in oklab, var(--c) 12%, var(--line-soft));
}
.section-head h2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.head-icon {
    flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
    color: var(--c); background: color-mix(in oklab, var(--c) 13%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 20%, transparent);
    transition: background-color var(--fast), box-shadow var(--fast);
}
.can-hover .section:hover .head-icon, .tap .head-icon { background: color-mix(in oklab, var(--c) 19%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 34%, transparent); }
.head-icon .icon { width: 18px; height: 18px; }
.head-meta { flex: none; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 1px 9px; border: 1px solid color-mix(in oklab, var(--c) 18%, var(--line-strong)); border-radius: 999px; }
.head-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.section-body { padding: 13px 14px 14px; }
.subhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.subhead h3 { margin: 0; font-size: 15px; font-weight: 650; }
.subhead .faint { font-size: 13px; }
.group + .group { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.group.boxed { background: rgb(5 14 19 / .26); border: 1px solid var(--line-soft); border-left: 3px solid color-mix(in oklab, var(--c) 55%, var(--line)); border-radius: var(--radius-sm); padding: 9px 12px 8px; }
.group.boxed + .group.boxed { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.group.boxed .subhead { margin-bottom: 8px; }
.group-note { color: var(--muted); font-size: 14px; margin: 0 0 8px; white-space: pre-line; }
.empty-hint { margin: 0; color: var(--faint); font-size: 14px; }
.sub-actions { margin: 10px 0 0; }

/* Priključak */
.meter-point + .meter-point { border-top: 1px dashed color-mix(in oklab, var(--c) 18%, var(--line)); margin-top: 14px; padding-top: 14px; }
.meter-point-name { font-weight: 650; margin: 0 0 8px; display: flex; align-items: center; gap: 4px; }
.ids { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.ids div { min-width: 0; }
.ids dt { font-size: 12.5px; color: var(--muted); }
.ids dd { margin: 1px 0 0; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.ids .value { font-size: 18px; font-weight: 650; letter-spacing: .02em; overflow-wrap: anywhere; }
.ids .value.small { font-size: 16px; letter-spacing: 0; }
.ids .meter { grid-column: 1 / -1; padding: 8px 10px; margin: 0 -2px 2px; border-radius: var(--radius-sm); background: rgb(0 0 0 / .14); border: 1px solid color-mix(in oklab, var(--c) 14%, var(--line-soft)); }
.ids .meter .value { font-size: 23px; }
.ids .missing { color: var(--faint); font-weight: 400; font-size: 14px; }
.ids .note { font-size: 13px; color: var(--muted); flex-basis: 100%; }

/* Tabele */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data thead th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data td, .data tbody th { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; font-weight: inherit; }
.data tbody tr:last-child > * { border-bottom: 0; }
.data tbody tr { transition: background-color var(--fast); }
.editing .section .data tbody tr:hover { background: color-mix(in oklab, var(--c) 7%, transparent); }
.data .r { text-align: right; }
.data .label { font-weight: 650; }
.data .sub { display: block; color: var(--faint); font-size: 12.5px; font-weight: 400; }
.data .note { white-space: pre-line; }
.data .edit-col { width: 44px; padding: 4px 0; text-align: right; vertical-align: middle; }
.data tr.unconfirmed td { color: var(--faint); }
.data tr.unconfirmed .label { color: var(--muted); font-weight: 600; }
.data tr.unconfirmed .edit-col { width: auto; white-space: nowrap; }
.data .metrics-line { display: none; }
.section .table-wrap, .admin-table { background: var(--surface); }
table.admin-table thead th { background: #10212b; padding: 10px 14px; }
table.admin-table td, table.admin-table tbody th { padding: 10px 14px; vertical-align: middle; }
table.admin-table tbody tr:hover { background: rgb(116 185 216 / .05); }
@media (min-width: 761px) {
    table.data.pumps { table-layout: fixed; }
    .data.pumps th.label-col { width: 70px; }
    .data.pumps th.metric-col { width: 100px; }
    .data.pumps th.edit-col { width: 84px; }
    .data.pumps.no-model .model-col, .data.pumps.no-model td.model { display: none; }
    .data.pumps.no-model th.label-col { width: auto; }
    .data.equipment th.kind-col { width: 34%; }
    .data.equipment th.power-col { width: 90px; }
}

/* Fotografije */
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.thumb { margin: 0; min-width: 0; }
.thumb a { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--field); cursor: zoom-in; outline: 1px solid rgb(255 255 255 / .04); outline-offset: -1px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale 240ms var(--ease-out), filter var(--fast); }
.thumb a:hover img { scale: 1.04; filter: brightness(1.08); }
.thumb figcaption { display: flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.thumb figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-all { margin-top: 10px; }
.photo-upload { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-progress { list-style: none; margin: 0; padding: 0; flex-basis: 100%; display: grid; gap: 6px; }
.upload-progress:empty { display: none; }
.upload-progress li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px; }
.upload-progress .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress .state { color: var(--muted); }
.upload-progress .ok .state, .upload-progress li.ok .state { color: var(--success); }
.upload-progress li.error { border-color: var(--danger-line); }
.upload-progress li.error .state { color: var(--danger-text); }
.upload-progress progress { grid-column: 1 / -1; width: 100%; height: 6px; accent-color: var(--primary-line); }
.photo-preview { display: block; max-width: 480px; border-radius: var(--radius); overflow: hidden; margin: 6px 0 8px; }
.photo-preview img { width: 100%; display: block; }

/* Dokumenti */
.docs { list-style: none; margin: 0 -8px; padding: 0; }
.docs li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: var(--radius-sm); transition: background-color var(--fast); }
.docs li + li { border-top: 1px solid var(--line-soft); }
.docs li:hover { background: color-mix(in oklab, var(--c) 7%, transparent); }
.doc-icon { width: 36px; height: 40px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #2a2f3a; color: #f0b3b3; border: 1px solid #5a3a42; transition: translate 200ms var(--ease-out); }
.docs li:hover .doc-icon { translate: 0 -2px; }
.doc-icon.image { background: #16323f; color: var(--accent); border-color: #2f5566; }
.docs .title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; transition: color var(--fast); }
.docs li:hover .title { color: color-mix(in oklab, var(--c) 40%, var(--text)); }
.docs .meta { display: block; font-size: 13px; color: var(--faint); }
.docs .note { white-space: pre-line; }

/* Vrednosti */
.values { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 16px; margin: 0; }
.values dt { font-size: 12.5px; color: var(--muted); }
.values dd { margin: 1px 0 0; font-weight: 650; }
.notes { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.kv { display: grid; gap: 8px; margin: 0; }
.kv div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.legend { margin-top: 16px; font-size: 14px; }

/* Dno kartona */
.missing-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.missing-row a, .missing-row .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; }
.missing-row a { color: var(--text); transition: border-color var(--fast), background-color var(--fast); }
.missing-row .icon { width: 15px; height: 15px; color: var(--c, var(--accent)); }
.missing-row a:hover { border-color: color-mix(in oklab, var(--c, var(--accent)) 45%, var(--line-strong)); background: color-mix(in oklab, var(--c, var(--accent)) 8%, transparent); text-decoration: none; }
.last-change { margin: 12px 0 0; font-size: 13px; color: var(--faint); }

/* Režim uređivanja */
.edit-banner {
    position: sticky; top: calc(var(--header-h) + 8px); z-index: 12;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 12px 9px 14px; margin-bottom: 16px; border-radius: var(--radius);
    background: rgb(23 58 74 / .95); backdrop-filter: blur(6px); border: 1px solid var(--primary-line); box-shadow: 0 8px 22px #0008;
}
.edit-banner p { margin: 0; flex: 1 1 260px; font-size: 14px; }
.editing .section { border-style: dashed; }

/* Pregled fotografija */
dialog.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #050b0ff2; color: var(--text); }
dialog.viewer::backdrop { background: #000a; }
.viewer-inner { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.viewer-top .counter { color: var(--muted); font-size: 14px; }
.viewer-top .btn { margin-left: auto; }
.viewer-stage { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; min-height: 0; touch-action: pan-y pinch-zoom; }
.viewer-stage img { max-width: 100%; max-height: 100%; margin: auto; display: block; object-fit: contain; }
.viewer-stage .nav-btn { height: 64px; width: 56px; border: 0; background: transparent; color: var(--text); font-size: 34px; cursor: pointer; border-radius: 6px; transition: background-color var(--fast); }
.viewer-stage .nav-btn:hover { background: #ffffff14; }
.viewer-caption { padding: 10px 16px 18px; text-align: center; font-size: 14px; }

/* ===== Forme ===== */
.form-page { max-width: 860px; }
.form-page h1 { font-size: 24px; margin: 2px 0 6px; }
.form-title { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.form-title h1 { margin: 0; }
.form-title .head-icon { width: 38px; height: 38px; border-radius: 10px; }
.form-title .head-icon .icon { width: 21px; height: 21px; }
fieldset { border: 1px solid color-mix(in oklab, var(--c) 10%, var(--line)); border-radius: var(--radius); background: color-mix(in oklab, var(--c) 3%, var(--surface)); margin: 0 0 14px; padding: 12px 16px 16px; min-width: 0; }
[data-tone] fieldset { --c: inherit; border-color: color-mix(in oklab, var(--c) 14%, var(--line)); background: color-mix(in oklab, var(--c) 4%, var(--surface)); }
legend { font-weight: 650; padding: 0 6px; font-size: 15px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.req { color: var(--amber); }
.field input, .field select, .field textarea {
    width: 100%; min-height: 42px; padding: 8px 11px;
    background: var(--field); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit;
    transition: border-color var(--fast), box-shadow var(--fast);
}
.field input[type="file"] { padding: 8px; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #46707f; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-line); outline: none; box-shadow: 0 0 0 3px rgb(77 147 177 / .2); }
.field [aria-invalid="true"] { border-color: var(--danger-line); }
.hint { font-size: 13px; color: var(--faint); margin: 4px 0 0; }
.field-error { font-size: 13px; color: var(--danger-text); margin: 4px 0 0; font-weight: 600; }
.input-unit { display: flex; align-items: stretch; }
.input-unit input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); min-width: 0; }
.input-unit span { display: grid; place-items: center; padding: 0 10px; min-width: 52px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #16303c; color: var(--muted); font-size: 13.5px; }
.password-control { display: flex; gap: 6px; }
.password-control input { flex: 1; min-width: 0; }
.check-field label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; cursor: pointer; }
.check-field input { width: 20px; height: 20px; accent-color: var(--primary-line); flex: none; }
.checks { display: grid; gap: 2px; }
.form-actions { display: flex; gap: 10px; margin: 18px 0 24px; flex-wrap: wrap; }
.danger-zone { border: 1px solid #5d3038; border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; background: rgb(138 54 64 / .05); }
.danger-zone p { margin: 0; flex: 1 1 240px; font-size: 14px; color: var(--muted); }
.danger-zone.compact { border-color: var(--line); border-style: dashed; background: none; }
.choice-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.choice-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 600; transition: border-color var(--fast), background-color var(--fast); }
.choice-list a:hover { border-color: var(--primary-line); text-decoration: none; background: var(--surface-2); }
.choice-list small { display: block; color: var(--faint); font-weight: 400; }
.choice-list a .icon { color: var(--accent); transition: translate var(--fast); }
.choice-list a:hover .icon { translate: 2px 0; }

/* Potvrda brisanja */
.confirm { max-width: 640px; margin: 20px auto; background: var(--surface); border: 1px solid #5d3038; border-radius: var(--radius); padding: 20px; }
.confirm h1 { margin: 0 0 6px; font-size: 22px; overflow-wrap: anywhere; }
.confirm-context { margin: 0 0 4px; font-size: 14px; }
.confirm ul { margin: 10px 0 14px; padding-left: 20px; }
.confirm li { margin: 3px 0; }
.confirm .warn { color: var(--danger-text); font-weight: 600; }
.confirm .field { margin-bottom: 14px; }
.confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Administracija: Korisnici i šifarnici kao jednake kartice ===== */
.admin-layout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.admin-layout > section { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.admin-layout > section + section { grid-column: span 3; }
.admin-layout.no-users > section { grid-column: 1 / -1; }
.admin-group { margin: 0 0 10px; font-size: 14px; font-weight: 650; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; }
.admin-grid.codes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-card {
    --tint: 5%;
    display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 14px;
    min-height: 168px; padding: 16px 16px 14px; border-radius: var(--radius); color: var(--text);
    background: linear-gradient(180deg, rgb(255 255 255 / .022), transparent 90px), color-mix(in oklab, var(--c) var(--tint), var(--surface));
    border: 1px solid color-mix(in oklab, var(--c) 14%, var(--line));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .035), 0 12px 26px -18px rgb(0 0 0 / .8);
    transition: --tint var(--fast), border-color var(--fast);
}
a.admin-card:hover { text-decoration: none; }
.can-hover a.admin-card:hover, a.admin-card.tap { --tint: 8.5%; border-color: color-mix(in oklab, var(--c) 30%, var(--line)); }
.admin-card[data-tone="objects"] { --c: var(--t-meter); }
.admin-card[data-tone="equip"] { --c: var(--t-tech); }
.admin-card[data-tone="docs"] { --c: var(--t-docs); }
.admin-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; flex: none; color: var(--c, var(--accent)); background: color-mix(in oklab, var(--c, var(--accent)) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c, var(--accent)) 20%, transparent); transition: background-color var(--fast), box-shadow var(--fast); }
.can-hover a.admin-card:hover .admin-icon, a.admin-card.tap .admin-icon { background: color-mix(in oklab, var(--c) 19%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 34%, transparent); }
.admin-icon .icon { width: 22px; height: 22px; }
.admin-card .admin-title { font-size: 17px; font-weight: 650; align-self: center; min-height: 44px; display: flex; align-items: center; }
.admin-card p { grid-column: 2; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.admin-card .card-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid color-mix(in oklab, var(--c) 12%, var(--line-soft)); color: var(--faint); font-size: 13px; }
.admin-card .count { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.admin-card .go { display: inline-grid; place-items: center; color: var(--faint); transition: translate var(--fast), color var(--fast); }
.admin-card .go .icon { width: 16px; height: 16px; }
.can-hover a.admin-card:hover .go, a.admin-card.tap .go { translate: 3px 0; color: var(--c); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-head p { margin: 0; }
.error-panel { margin-top: 24px; }
.error-panel h1 { font-size: 22px; margin-bottom: 8px; }

/* Prijava */
.login-page { display: grid; place-items: center; padding-top: 6vh; }
.login { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.login form { display: grid; gap: 14px; }
.login-brand { text-align: center; margin-bottom: 14px; }
.login-brand img { width: 96px; height: 96px; }
.login-brand h1 { font-size: 24px; margin-top: 8px; }
.login-brand p { color: var(--muted); margin: 2px 0 0; }

/* ===== Mikroanimacije =====
   Jednokratne: prelazak mišem preko celine ili dugmeta (uz zadršku 110 ms, da kratak prelaz
   ne pokrene animaciju) ili dodir na telefonu (klasa .tap iz app.js). Ne prikazuju stanje opreme. */
.i-pump .rotor, .i-cog .spin { transform-box: view-box; transform-origin: 12px 12px; }
.i-camera .lens { transform-box: fill-box; transform-origin: center; }
.i-map { transform-origin: 50% 100%; }
.i-ruler .dim { transform-box: view-box; transform-origin: 12px 5px; }
.i-note .ln, .i-file .ln { stroke-dasharray: 8; stroke-dashoffset: 0; }
.i-plug .disp { fill: transparent; }
.i-edit { transform-origin: 20% 80%; }
@keyframes a-rotor { to { rotate: 360deg; } }
@keyframes a-cog { to { rotate: 60deg; } }
@keyframes a-zap { 0%, 100% { fill: transparent; filter: none; } 35% { fill: color-mix(in oklab, currentColor 42%, transparent); filter: drop-shadow(0 0 3px color-mix(in oklab, currentColor 70%, transparent)); } }
@keyframes a-shutter { 40% { scale: .55; } }
@keyframes a-doc { 40% { transform: translateY(-1.5px) rotate(-7deg); } }
@keyframes a-pin { 35% { translate: 0 -3px; } 65% { translate: 0 0; scale: 1.08 .92; } }
@keyframes a-dim { from { scale: .35 1; opacity: .3; } }
@keyframes a-write { from { stroke-dashoffset: 8; } }
/* Krajnji koraci moraju biti eksplicitni: Chrome 158 ruši renderer (STATUS_BREAKPOINT) kada iz implicitnog
   koraka interpolira SVG fill prema color-mix() sa currentColor. */
@keyframes a-disp { 0%, 100% { fill: transparent; } 30% { fill: color-mix(in oklab, currentColor 38%, transparent); } }
@keyframes a-plus { to { rotate: 90deg; } }
@keyframes a-pencil { 30% { rotate: -14deg; } 60% { rotate: 6deg; } }
.can-hover :is(.section, .admin-card, .hov):hover .i-pump .rotor, .tap .i-pump .rotor { animation: a-rotor 820ms var(--ease-out) 110ms; }
.can-hover :is(.section, .admin-card, .hov):hover .i-cog .spin, .tap .i-cog .spin { animation: a-cog 640ms var(--ease-out) 110ms; }
.can-hover :is(.section, .hov):hover .i-bolt path, .tap .i-bolt path { animation: a-zap 620ms ease 110ms; }
.can-hover :is(.section, .btn, .hov):hover .i-camera .lens, .tap .i-camera .lens { animation: a-shutter 340ms ease 110ms; }
.can-hover :is(.section, .admin-card, .hov):hover .i-file, .tap .i-file { animation: a-doc 460ms var(--ease-out) 110ms; }
.can-hover :is(.section, .admin-card, .hov):hover .i-file .ln, .tap .i-file .ln { animation: a-write 520ms ease 200ms backwards; }
.can-hover :is(.btn, .map-link, .hov):hover .i-map, .tap .i-map { animation: a-pin 480ms var(--ease-out) 60ms; }
.can-hover :is(.section, .hov):hover .i-ruler .dim, .tap .i-ruler .dim { animation: a-dim 460ms var(--ease-out) 110ms backwards; }
.can-hover :is(.section, .hov):hover .i-note .ln, .tap .i-note .ln { animation: a-write 460ms ease 110ms backwards; }
.can-hover :is(.section, .hov):hover .i-note .ln:nth-of-type(2), .tap .i-note .ln:nth-of-type(2) { animation-delay: 190ms; }
.can-hover :is(.section, .hov):hover .i-note .ln:nth-of-type(3), .tap .i-note .ln:nth-of-type(3) { animation-delay: 270ms; }
.can-hover :is(.section, .hov):hover .i-plug .disp, .tap .i-plug .disp { animation: a-disp 620ms ease 110ms; }
.can-hover .btn:hover .i-add, .btn.tap .i-add { animation: a-plus 260ms var(--ease-out); }
.can-hover :is(.btn, .icon-btn, .pump-chips a):hover .i-edit, :is(.btn, .icon-btn).tap .i-edit { animation: a-pencil 360ms ease; }

/* ===== Tablet ===== */
@media (max-width: 1100px) {
    .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
    .admin-layout > section + section { grid-column: 1 / -1; margin-top: 18px; }
}

/* ===== Telefon ===== */
@media (max-width: 760px) {
    .page { padding: 12px 12px 40px; }
    .topbar-inner { padding: 0 12px; gap: 10px; }
    .brand small { display: none; }
    .brand > span { display: none; }
    .nav { flex: 1; }
    .nav a { padding: 8px 10px; }
    .nav a[aria-current]::after { left: 10px; right: 10px; }
    .account summary { padding: 3px; }
    .account summary::after { display: none; }
    .account .full { display: none; }
    .avatar { width: 34px; height: 34px; font-size: 13px; }
    h1 { font-size: 22px; }
    .page-head { margin-bottom: 10px; }
    .toolbar { position: sticky; top: var(--header-h); z-index: 10; margin: -4px -12px 8px; padding: 8px 12px; background: var(--bg); grid-template-columns: minmax(0, 1fr) 116px; border-bottom: 1px solid var(--line); }
    .search input { font-size: 16px; }
    .type-filter select { font-size: 15px; }
    .table-wrap { margin: 0 -12px; border-radius: 0; border-left: 0; border-right: 0; }
    .catalog tbody tr { padding: 10px 12px; }

    .object-head { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-bottom: 12px; margin-bottom: 10px; }
    .object-head h1 { font-size: 23px; }
    .has-back .facts { --pad: 0px; }
    .facts { --sep: 9px; font-size: 14px; }
    .facts .coords { flex-basis: 100%; }
    .object-head .actions { grid-column: 1; grid-row: auto; justify-content: stretch; margin-top: 6px; }
    .object-head .actions .btn { flex: 1; min-height: 44px; }
    .compact-head {
        position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 25;
        display: flex; align-items: center; gap: 10px; padding: 8px 12px;
        background: rgb(15 31 40 / .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
        transform: translateY(-110%); opacity: 0; visibility: hidden; transition: transform .18s, opacity .18s, visibility .18s;
    }
    .compact-head.show { transform: none; opacity: 1; visibility: visible; }
    .compact-head strong { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .editing .compact-head { display: none; }
    .jump { display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px 12px; padding: 2px 12px 6px; scrollbar-width: none; }
    .jump::-webkit-scrollbar { display: none; }
    .jump a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--c, var(--accent)) 22%, var(--line-strong)); background: color-mix(in oklab, var(--c, var(--accent)) 5%, transparent); color: var(--text); font-size: 13.5px; font-weight: 600; transition: background-color var(--fast); }
    .jump a:hover { text-decoration: none; }
    .jump a:active { background: color-mix(in oklab, var(--c, var(--accent)) 14%, transparent); }
    .jump a .icon { width: 15px; height: 15px; color: var(--c, var(--accent)); }
    .jump a span { color: var(--faint); }
    .edit-banner { margin: 0 -12px 12px; border-radius: 0; border-left: 0; border-right: 0; padding: 8px 12px; top: var(--header-h); }
    .edit-banner p { flex-basis: 100%; }
    .edit-banner .banner-detail { display: none; }
    .edit-banner .btn { flex: 1; }
    .card-grid, .card-col, .pair { gap: 10px; }
    .section { border-radius: 0; border-left: 0 !important; border-right: 0 !important; margin: 0 -12px; box-shadow: none; }
    .section-head { padding: 8px 12px; border-radius: 0; }
    .head-icon { width: 28px; height: 28px; }
    .group.boxed { padding: 9px 10px 7px; }
    .section-body { padding: 12px; }
    .ids .value { font-size: 17px; }
    .ids .meter .value { font-size: 21px; }

    .data thead { display: none; }
    table.data, .data tbody { display: block; }
    .data tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
    .data tbody tr:last-child { border-bottom: 0; }
    .data tr > td, .data tr > th { padding: 0; border: 0; grid-column: 1; }
    .data .edit-col { grid-column: 2 !important; grid-row: 1 / span 4; align-self: center; width: auto; }
    .data.equipment td.power { color: var(--muted); text-align: left; }
    .data.equipment td.empty { display: none; }
    .data.pumps tr { grid-template-columns: auto minmax(0, 1fr) auto; }
    .data.pumps td.label { grid-column: 1; grid-row: 1 / span 2; font-size: 16px; min-width: 34px; }
    .data.pumps td.model { grid-column: 2; }
    .data.pumps .edit-col { grid-column: 3 !important; }
    .data.pumps .desk { display: none; }
    .data.pumps .metrics-line { display: block; color: var(--muted); margin-top: 2px; }
    .data.pumps .tag { white-space: normal; }
    .data.pumps tr.unconfirmed .edit-col { grid-column: 2 / span 2 !important; grid-row: auto; justify-self: start; margin-top: 6px; }
    table.admin-table tr { padding: 10px 12px; }
    table.admin-table td, table.admin-table tbody th { padding: 0; }
    .missing-row { margin: 0 -12px; border-radius: 0; border-left: 0; border-right: 0; }
    .card-foot .last-change { padding: 0 2px; }

    .admin-layout { grid-template-columns: minmax(0, 1fr); }
    .admin-layout > section + section { margin-top: 18px; }
    .admin-grid.codes { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .admin-card { min-height: 0; grid-template-rows: auto auto auto; padding: 14px 14px 12px; }
    .admin-card .card-foot { margin-top: 10px; padding-top: 8px; }

    fieldset { margin-left: -12px; margin-right: -12px; border-radius: 0; border-left: 0; border-right: 0; }
    .fields { grid-template-columns: minmax(0, 1fr); }
    .field input, .field select, .field textarea { font-size: 16px; min-height: 44px; }
    .form-actions { position: sticky; bottom: 0; z-index: 5; background: var(--bg); margin: 0 -12px; padding: 10px 12px; border-top: 1px solid var(--line); }
    .form-actions .btn { flex: 1; min-height: 46px; }
    .confirm { margin: 8px -12px; border-radius: 0; border-left: 0; border-right: 0; }
    .confirm-actions .btn { flex: 1; min-height: 46px; }
    .kv div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .viewer-stage { grid-template-columns: 0 minmax(0, 1fr) 0; }
    .viewer-stage .nav-btn { display: none; }
    .login-page { padding-top: 2vh; }
}
@media (max-width: 380px) {
    .nav a { padding: 8px 7px; font-size: 14px; }
}
@media (max-width: 330px) {
    .ids { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media print {
    .topbar, .jump, .compact-head, .edit-banner, .dev-footer, .missing-row, .head-actions, .icon-btn, .crumbs, .object-head .actions { display: none !important; }
    body { background: #fff; color: #000; }
    .section { border-color: #999; background: #fff; box-shadow: none; }
    .section-head { background: none; }
}

/* Pumpe bez nazivnih podataka: sažet spisak oznaka umesto tabele crtica. */
.pump-chips { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pump-chips li { display: inline-flex; }
.pump-chips li, .pump-chips a { align-items: center; gap: 6px; }
.pump-chips li { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 650; background: var(--surface-2); transition: border-color var(--fast), background-color var(--fast); }
.pump-chips li:has(a):hover { border-color: color-mix(in oklab, var(--c) 45%, var(--line-strong)); background: color-mix(in oklab, var(--c) 9%, var(--surface-2)); }
.pump-chips a { display: inline-flex; color: var(--text); }
.pump-chips a:hover { text-decoration: none; }
.pump-chips .icon { width: 14px; height: 14px; color: var(--muted); }
@media (min-width: 761px) { .data.pumps.no-metrics th:nth-child(2) { width: auto; } }
.editing .section, .editing .missing-row { scroll-margin-top: calc(var(--header-h) + 76px); }
@media (max-width: 760px) { .editing .section { scroll-margin-top: calc(var(--header-h) + 104px); } }
.viewer-stage { height: 100%; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.viewer-stage img { width: auto; height: auto; max-height: 100%; min-height: 0; }

/* Administrativne tabele na telefonu: naziv, pa podaci u jednom redu. */
.phone-only { display: none; }
@media (max-width: 760px) {
    .phone-only { display: inline; }
    table.admin-table tr { display: block; position: relative; padding: 10px 56px 10px 12px; }
    table.admin-table tr > td, table.admin-table tr > th { display: inline; font-size: 13.5px; color: var(--muted); text-align: left; }
    table.admin-table tr > .label { display: block; font-size: 15px; color: var(--text); margin-bottom: 2px; }
    table.admin-table tr > td:not(.label):not(.edit-col) + td:not(.edit-col)::before { content: " · "; color: var(--faint); }
    table.admin-table tr > .edit-col { position: absolute; right: 8px; top: 50%; translate: 0 -50%; }
    table.admin-table .tag { font-size: 11.5px; }
}

/* Površina A × B: izračunata vrednost, ne unosi se. */
.input-unit output.computed { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 42px; padding: 8px 11px; border: 1px dashed var(--line-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .input-unit output.computed { min-height: 44px; } }
