:root {
    color-scheme: light;
    --ink: #14202b;
    --muted: #5c6b7a;
    --line: #d5dee6;
    --bg: #eef2f5;
    --card: #ffffff;
    --accent: #0b6e4f;
    --accent-ink: #ffffff;
    --top: #102033;
    --danger: #b42318;
    --warn: #9a4d12;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font: 15px/1.45 "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}
h1, h2, h3 { margin: 0; font-weight: 650; }
h1 { font-size: 1.35rem; }
.page-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; }
.page-head h1 { flex: 1; min-width: 0; }
h2 { font-size: 1.05rem; }
h3 { font-size: 1.15rem; }
a { color: inherit; }
button, input, select { font: inherit; }
input, select, textarea {
    width: 100%;
    border: 1px solid #c5d0da;
    background: #fff;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    color: var(--ink);
}
input:focus, select:focus { outline: 2px solid rgba(11, 110, 79, 0.28); border-color: var(--accent); }

.shell { min-height: 100vh; display: flex; flex-direction: row; align-items: stretch; }
.side {
    width: 232px;
    flex: 0 0 232px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.1rem 0.75rem 1rem;
    background: var(--top);
    color: #f4f7fa;
}
.brand {
    display: flex;
    justify-content: center;
    padding: 0.15rem 0.35rem 0.35rem;
}
.brand img { width: 72px; height: 72px; display: block; border: 1px solid #fff; border-radius: 50%; }
.login-logo { width: 132px; height: 132px; display: block; margin: 0 auto; }
.door-row { display: flex; flex-wrap: wrap; gap: 1rem 2.2rem; align-items: center; margin: 0 0 1.1rem; }
.door-card { display: flex; align-items: center; gap: 1rem; margin: 0; }
.door-keep { padding-left: 0.2rem; }
.door-keep .door-status.on { color: var(--warn); }
.door-btn {
    width: 92px;
    height: 92px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--accent);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}
.door-btn svg { width: 54px; height: 54px; }
.door-btn .ajar { display: none; }
.door-btn.otvorena { color: var(--warn); background: #fff6ee; border-color: #f0d2b4; }
.door-btn.otvorena .shut { display: none; }
.door-btn.otvorena .ajar { display: block; }
.door-btn.offline { color: var(--muted); }
.door-status { margin: 0; font-weight: 700; font-size: 1.05rem; }
.door-status span { display: block; margin-top: 0.15rem; color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.side nav { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 1.1rem; }
.side nav a, .side .logout {
    color: #d5e0ea;
    text-decoration: none;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
}
.side nav a.active, .side nav a:hover, .side .logout:hover { background: rgba(255,255,255,0.12); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: 0.25rem; }
.who-mini { margin: 0; padding: 0.2rem 0.7rem; color: #9aafc2; font-size: 0.78rem; }
main { flex: 1; min-width: 0; width: auto; padding: 1rem 1.25rem 2rem; }

.btn, main button, dialog button, dialog a.btn, a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn.ghost, main button.ghost, dialog .btn.ghost, main button.stop {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}
.btn.open, main button.open { background: var(--warn); color: #fff; }
.btn.danger, main button.text-danger, dialog button.text-danger, .btn-sm.danger {
    background: #fff;
    color: var(--danger);
    border-color: #f0c9c6;
}
.btn-sm { min-height: 1.9rem; padding: 0.2rem 0.6rem; font-size: 0.82rem; }
.chip button { min-height: 0; padding: 0 0.2rem; border: 0; background: transparent; color: var(--muted); }

.muted { color: var(--muted); margin: 0; }
.flash { margin: 0 0 0.8rem; padding: 0.7rem 0.85rem; border-radius: 8px; }
.flash.ok { background: #e5f6ee; }
.flash.bad { background: #fdecea; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    width: 100%;
    margin-bottom: 0.75rem;
}
.toolbar-search { display: flex; gap: 0.45rem; flex: 1; min-width: min(100%, 280px); }
.toolbar > .toolbar-search { flex: 0 1 50%; width: 50%; max-width: 50%; min-width: 0; }
.toolbar-search input { flex: 1; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; justify-content: flex-end; margin-left: auto; }
.pdf-ikona, button.pdf-ikona { display: inline-flex; align-items: center; justify-content: center; line-height: 0; background: transparent; border: 0; padding: 0; cursor: pointer; flex: none; }
.pdf-ikona img { width: auto; height: 42px; display: block; }
.ulaz-trazi { display: flex; gap: 0.4rem; align-items: center; }
.ulaz-trazi input { width: 220px; }
.ulaz-alat { align-items: end; }
.ulaz-raspon { display: flex; gap: 0.45rem; align-items: end; }
.ulaz-raspon .field { gap: 0.15rem; }
.ulaz-raspon input { width: 10.2rem; }
.pdf-raspon { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.pdf-raspon .field { min-width: 9.5rem; }
.opis-red { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.35rem; }
.opis-red input { min-width: 12rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.tab {
    text-decoration: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
}
.tab.active { background: var(--top); color: #fff; border-color: var(--top); }
.count { color: var(--muted); font-size: 0.9rem; }

.form { display: flex; flex-direction: column; gap: 0.9rem; }
.form-hidden { display: none; }
.form-body, .form-section { display: grid; gap: 0.7rem; }
.form-section-title {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.field-row, .field-row.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.field-row.triple { grid-template-columns: 1.2fr 1.2fr 0.9fr; }
.field-row.align-end { align-items: end; }
.field-stack { display: grid; gap: 0.7rem; max-width: 22rem; }
.field { display: grid; gap: 0.25rem; min-width: 0; color: var(--muted); font-size: 0.86rem; }
.field > span { font-weight: 650; }
.field.need > span { color: var(--warn); }
.form-foot { display: flex; justify-content: flex-end; gap: 0.45rem; flex-wrap: wrap; }
.alat-red { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-bottom: 0.75rem; }
.prava { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.prava fieldset { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.75rem 0.7rem; }
.prava legend { padding: 0 0.3rem; font-size: 0.78rem; font-weight: 650; color: var(--muted); }
.prava label { display: flex; align-items: center; gap: 0.45rem; margin: 0.28rem 0; color: var(--ink); font-weight: 500; }
.prava input { width: auto; }
.grupe { display: grid; gap: 0.8rem; }
.grupa-brisi { display: flex; justify-content: flex-end; margin-top: -0.35rem; }
.key-pick {
    max-height: min(52vh, 28rem);
    overflow: auto;
    display: grid;
    gap: 0.15rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.skriven { display: none !important; }
.key-pick label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.8rem;
    color: var(--ink);
    font-weight: 550;
}
.key-pick input { width: auto; }
.key-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 650;
    color: var(--ink);
}
.key-all input { width: auto; }
.card-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 0.75rem;
}
.inline-form { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; min-width: 10rem; }
.inline-form input[type="password"] { width: 9.5rem; }

.switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.45rem;
    color: var(--ink);
    font-weight: 650;
    cursor: pointer;
}
.switch input {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.switch i {
    position: relative;
    width: 2.7rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #c5d0da;
    flex: none;
}
.switch i::after {
    content: "";
    position: absolute;
    top: 0.16rem; left: 0.16rem;
    width: 1.16rem; height: 1.16rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(1.2rem); }

dialog {
    width: min(760px, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    border: 0;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 24px 70px rgba(16, 32, 51, 0.28);
}
dialog .form { padding: 1.1rem 1.2rem 1.2rem; overflow: auto; max-height: calc(100vh - 2rem); }
dialog > form + form { padding: 0 1.2rem 1.2rem; }
dialog::backdrop { background: rgba(16, 32, 51, 0.45); }

.potvrda {
    position: fixed;
    inset: 0;
    width: min(22rem, calc(100vw - 2rem));
    height: fit-content;
    margin: auto;
    border: 0;
    border-radius: 14px;
    padding: 0;
    background: #fff;
    color: var(--ink);
    white-space: normal;
    text-align: left;
    overflow: visible;
    box-shadow: 0 24px 70px rgba(16, 32, 51, 0.28);
}
.potvrda::backdrop { background: rgba(16, 32, 51, 0.45); }
.potvrda p {
    margin: 0;
    padding: 1.25rem 1.25rem 0.15rem;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.4;
    white-space: normal;
}
.potvrda-akcije {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.2rem;
}
.potvrda .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 650;
    cursor: pointer;
}
.potvrda .btn.ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}
.potvrda .btn.danger {
    background: var(--danger);
    color: #fff;
    border-color: transparent;
}

.read-status {
    display: grid;
    gap: 0.1rem;
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    background: #f4f7fa;
    border: 1px solid var(--line);
}
.read-status span, .read-status em { color: var(--muted); font-size: 0.78rem; font-style: normal; }
.read-status.cita strong { color: var(--warn); }
.read-status.ucitano strong { color: var(--accent); }
.keys { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.keys li { padding: 0.45rem 0.65rem; background: #f4f7fa; border-radius: 8px; font-family: Consolas, monospace; }
.keys li.ceka { font-family: inherit; color: var(--warn); }
.ceka-kartica { margin: 0; padding: 0.7rem 0.8rem; border-radius: 8px; background: #fff6e8; color: var(--warn); }

.table-wrap { width: 100%; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
table.book { white-space: nowrap; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #f7fafc; }
th a { color: inherit; text-decoration: none; }
main th button.th-gumb {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}
main th button.th-gumb.ima { color: var(--accent); }
main th button.th-gumb.nema { color: var(--danger); }
th.par, td.par { width: 1px; white-space: nowrap; padding-right: 0.7rem; }
td.par { position: relative; overflow: visible; }
.par-rb { display: inline-block; min-width: 1.5rem; margin-right: 0.2rem; }
th.par .th-gumb { margin-left: 0.35rem; }
main button.kljuc-ikona {
    position: relative;
    display: inline-flex;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    line-height: 0;
    cursor: pointer;
}
.kljuc-ikona svg { width: 17px; height: 17px; display: block; }
.kljuc-broj {
    display: none;
    position: absolute;
    left: calc(100% + 0.35rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(16, 32, 51, 0.12);
}
.kljuc-ikona:hover .kljuc-broj,
.kljuc-ikona.otvoren .kljuc-broj { display: block; }
tr:last-child td { border-bottom: 0; }
.who-link { font-weight: 650; text-decoration: none; color: var(--top); }
.who-link:hover { text-decoration: underline; }
main .tabs button.tab {
    min-height: 0;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 400;
}
main .tabs button.tab.active { background: var(--top); color: #fff; border-color: var(--top); }
.profile-lead { margin: 0.25rem 0 0; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 1rem; margin: 0; }
.facts div { display: grid; gap: 0.12rem; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { margin: 0; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.profile-block { display: grid; gap: 0.45rem; }
.visit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.visit-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.7rem; background: #f4f7fa; border-radius: 8px; }
.visit-list span { color: var(--muted); text-align: right; }
.visit-chart { display: flex; align-items: stretch; gap: 0.35rem; height: 150px; overflow-x: auto; }
.visit-col { flex: 1 0 2.2rem; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-width: 0; }
.visit-col > span, .visit-col em { font-size: 0.68rem; color: var(--muted); font-style: normal; }
.visit-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.visit-bar i { display: block; width: 70%; background: var(--accent); border-radius: 4px 4px 0 0; }
td.actions { text-align: right; }
.cell-actions { display: inline-flex; gap: 0.35rem; align-items: center; }
span.on { color: var(--accent); font-weight: 700; }
span.off { color: var(--danger); font-weight: 700; }
code { font-family: Consolas, monospace; }

.bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; justify-content: space-between; width: 100%; margin-bottom: 1rem; }
.search { display: grid; gap: 0.2rem; flex: 1; min-width: min(100%, 240px); color: var(--muted); font-size: 0.85rem; }
.bar-side { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pill { border-radius: 999px; padding: 0.2rem 0.65rem; background: #e6edf3; font-size: 0.85rem; }
.pill.on { background: #e5f6ee; color: var(--accent); }
.pill.off { background: #fdecea; color: var(--danger); }

section { margin-top: 1.25rem; width: 100%; }
.section-head { display: flex; justify-content: space-between; gap: 0.75rem; align-items: end; margin-bottom: 0.55rem; flex-wrap: wrap; }
.section-head a { color: var(--accent); font-weight: 650; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.pager { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.65rem; }
#zapisnik .toolbar-search { flex: 1; min-width: min(100%, 240px); max-width: 420px; }
.members { display: grid; gap: 0.5rem; width: 100%; }
.member {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
}
.avatar {
    width: 36px; height: 36px; border-radius: 8px;
    display: grid; place-items: center;
    background: #e7f3ee; color: var(--accent); font-weight: 750;
}
.who { display: grid; gap: 0.1rem; min-width: 0; }
.who span { color: var(--muted); font-size: 0.86rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.chip { display: inline-flex; align-items: center; gap: 0.25rem; background: #f4f7fa; border-radius: 999px; padding: 0.1rem 0.5rem; font-size: 0.8rem; }
.chip form { margin: 0; }
.member-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; width: 100%; margin: 0.75rem 0 1rem; }
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; width: 100%; }
.stack { display: grid; gap: 0.4rem; }
.stat, .row-card {
    display: grid;
    gap: 0.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    padding: 0.8rem 0.9rem;
}
.stat strong { font-size: 1.7rem; }
.stat span, .row-card span, .row-card em { color: var(--muted); font-style: normal; }
.row-card em.on { color: var(--accent); }
.row-card em.off { color: var(--danger); }

.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--top); padding-bottom: 2.5rem; }
.login-copy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0.85rem;
    margin: 0;
    text-align: center;
    color: rgba(244, 247, 250, 0.72);
    font-size: 0.8rem;
}
.login-card {
    width: min(420px, calc(100% - 2rem));
    background: #fff;
    border-radius: 12px;
    padding: 1.3rem;
    display: grid;
    gap: 0.75rem;
}
.login-card h1 { font-size: 1.45rem; }
.login-card label { display: grid; gap: 0.3rem; }
.login-card button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.3rem;
    margin-top: 0.2rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 650;
    cursor: pointer;
}
.eyebrow { margin: 0; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; color: var(--warn); }
.api-help { display: grid; gap: 0.7rem; }
.api-help pre {
    margin: 0;
    padding: 0.75rem 0.85rem;
    background: var(--top);
    color: #f4f7fa;
    border-radius: 8px;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.api-kljuc { font-family: Consolas, monospace; word-break: break-all; }

.topbar, .nav-backdrop { display: none; }

@media (max-width: 900px) {
    .dash, .stats { grid-template-columns: 1fr; }
    .member { grid-template-columns: auto 1fr; }
    .member-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 820px), (orientation: portrait) and (max-width: 1100px) {
    .topbar {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        position: fixed;
        z-index: 80;
        top: 0;
        left: 0;
        right: 0;
        height: calc(52px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 0.85rem 0 0.35rem;
        background: var(--top);
        color: #fff;
    }
    .topbar-title {
        margin: 0;
        font-weight: 650;
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .menu-toggle {
        display: grid;
        gap: 5px;
        align-content: center;
        justify-items: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: transparent;
        cursor: pointer;
        flex: none;
    }
    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: #fff;
        transition: transform 0.15s ease, opacity 0.15s ease;
    }
    body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
    body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-backdrop {
        display: block;
        position: fixed;
        top: calc(52px + env(safe-area-inset-top));
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 55;
        background: rgba(16, 32, 51, 0.45);
        opacity: 0;
        pointer-events: none;
    }
    body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
    body.nav-open { overflow: hidden; }
    .side {
        position: fixed;
        z-index: 60;
        left: 0;
        top: calc(52px + env(safe-area-inset-top));
        width: min(280px, 88vw);
        flex: none;
        height: calc(100vh - 52px - env(safe-area-inset-top));
        min-height: 0;
        overflow: auto;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }
    body.nav-open .side { transform: none; }
    .brand img { width: 64px; height: 64px; }
    main { padding: calc(52px + env(safe-area-inset-top) + 0.75rem) 0.65rem 1.4rem; }
    h1 { font-size: 1.12rem; }
    h2 { font-size: 0.98rem; }
    .page-head { align-items: flex-start; gap: 0.45rem; margin-bottom: 0.65rem; }
    .page-head h1 { overflow-wrap: anywhere; }
    .pdf-ikona img { height: 32px; }
    .prava { grid-template-columns: 1fr; }
    .toolbar { gap: 0.45rem; }
    .toolbar > .toolbar-search,
    .toolbar-search,
    .toolbar-row,
    .ulaz-trazi,
    .ulaz-raspon,
    .bar,
    .bar-side,
    .search { flex: 1 1 100%; width: 100%; max-width: none; margin-left: 0; }
    .toolbar-search input,
    .ulaz-trazi input,
    .search input { flex: 1 1 auto; width: auto; min-width: 0; }
    .toolbar-row, .bar-side, .alat-red { justify-content: flex-start; }
    .ulaz-trazi { flex-wrap: nowrap; }
    .ulaz-raspon .field { flex: 1; min-width: 0; }
    .ulaz-raspon input { width: 100%; }
    .toolbar-search .btn, .ulaz-trazi .btn { flex: none; }
    .btn, main button, dialog button, dialog a.btn, a.btn { white-space: normal; min-height: 2rem; padding: 0.3rem 0.65rem; }
    .chip button, button.pdf-ikona, .door-btn, main .tabs button.tab { min-height: 0; padding: 0.3rem 0.65rem; white-space: nowrap; }
    main th button.th-gumb, main button.kljuc-ikona { min-height: 0; padding: 0; white-space: nowrap; }
    .tabs { width: 100%; }
    .field-row, .field-row.pair, .field-row.triple { grid-template-columns: 1fr; }
    .field-stack { max-width: none; }
    .inline-form, .cell-actions { width: 100%; }
    .inline-form select, .inline-form input[type="password"] { width: 100%; min-width: 0; }
    td.actions { text-align: left; }
    .table-wrap { -webkit-overflow-scrolling: touch; }
    th, td { padding: 0.4rem 0.45rem; font-size: 0.82rem; }
    th { letter-spacing: 0; }
    .door-btn { width: 76px; height: 76px; }
    .door-btn svg { width: 42px; height: 42px; }
    .door-status { font-size: 0.98rem; }
    .stat, .row-card { padding: 0.65rem 0.7rem; }
    .stat strong { font-size: 1.35rem; }
    .member { padding: 0.6rem; gap: 0.55rem; }
    section { margin-top: 0.95rem; }
    .login-logo { width: 104px; height: 104px; }
    dialog.sheet {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        border-radius: 0;
    }
}
