:root {
  color-scheme: dark;
  --bg: #181a20;
  --surface: #21242c;
  --surface-alt: #2a2e38;
  --border: #3a3f4c;
  --text: #eceff4;
  --muted: #969eaf;
  --accent: #388ee0;
  --violet: #7b5bd6;
  --success: #2ea061;
  --danger: #c74646;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.session-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
}
.session-loading img { animation: session-pulse 1.1s ease-in-out infinite alternate; }
@keyframes session-pulse { to { opacity: .45; transform: scale(.94); } }

/* Prijava namjerno prati postojeći PDTHUB POS portal. */
.signin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(900px 600px at 0 0, rgba(56,142,224,.15), transparent 65%),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

.signin-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(38px, 5vw, 72px) clamp(38px, 7vw, 110px);
  overflow: hidden;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(600px 500px at 15% 85%, rgba(123,91,214,.24), transparent 67%),
    radial-gradient(740px 540px at 100% 10%, rgba(56,142,224,.24), transparent 68%),
    linear-gradient(180deg, rgba(13,16,22,.58) 0%, rgba(13,16,22,.72) 55%, rgba(13,16,22,.94) 100%),
    url('signin-gas-station.png') center / cover no-repeat,
    #1b1e25;
}

.signin-intro::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -150px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.014), 0 0 0 110px rgba(255,255,255,.01);
  pointer-events: none;
}

.signin-logo {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 13px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}
.signin-logo img { width: 47px; height: 47px; object-fit: contain; }
.signin-logo b { color: #70b7f7; font-weight: 700; }
.intro-copy { position: relative; z-index: 1; max-width: 650px; margin: 70px 0; }
.signin-eyebrow, .section-eyebrow { margin: 0 0 15px; color: #6eb4f4; font-size: 11.5px; font-weight: 700; letter-spacing: .11em; }
.intro-copy h1 { max-width: 640px; margin: 0 0 22px; font-size: clamp(38px, 5vw, 64px); line-height: 1.07; letter-spacing: -.035em; }
.intro-copy > p:not(.signin-eyebrow) { max-width: 590px; margin: 0; color: #a8b0bf; font-size: 18px; line-height: 1.7; }
.portal-benefits { list-style: none; margin: 35px 0 0; padding: 0; }
.portal-benefits li { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: #dce1e9; font-size: 14px; }
.portal-benefits i, .signin-foot i, .live-state i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(46,160,97,.13); }
.back-home { position: relative; z-index: 1; align-self: flex-start; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-home:hover { color: var(--text); }

.signin-panel {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 70px clamp(28px, 5vw, 78px) 50px;
  background: rgba(24,26,32,.76);
}
.signin { width: 100%; max-width: 430px; }
.signin h2 { margin: 0 0 10px; font-size: 34px; line-height: 1.2; letter-spacing: -.02em; }
.signin-subtitle { margin: 0 0 31px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.signin-foot { display: flex; align-items: center; gap: 9px; width: 100%; max-width: 430px; margin: 25px 0 0; color: #737c8d; font-size: 11px; line-height: 1.5; }

label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 13px; }
input, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font: 14px inherit;
}
input { margin: 7px 0 17px; }
select { margin-top: 7px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,142,224,.18); }
button, .btn {
  width: auto;
  padding: 11px 17px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font: 600 14px inherit;
  cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: default; }
.signin button { width: 100%; padding: 14px; font-size: 15px; }
.hint { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.error { display: none; margin-bottom: 18px; padding: 11px 13px; border: 1px solid rgba(199,70,70,.45); border-radius: 9px; background: rgba(199,70,70,.14); color: #ffb4b4; font-size: 14px; }
.error.show { display: block; }

/* Portal nakon prijave. */
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar > img { width: 34px; height: 34px; object-fit: contain; }
.topbar .title { font-size: 16px; font-weight: 600; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.scope-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.scope-picker { width: auto; min-width: 190px; margin: 0 0 0 5px; padding: 8px 34px 8px 11px; background: var(--surface-alt); }
.who { color: var(--muted); font-size: 12px; line-height: 1.35; text-align: right; white-space: nowrap; }
.who b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.who span { display: block; }
.account-link { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.account-link:hover { color: var(--text); }
.btn-ghost { padding: 9px 16px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text); }

.nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 2px; padding: 0 24px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--border); }
.nav a { padding: 13px 18px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); border-bottom-color: var(--accent); }

.portal-main { max-width: 1180px; margin: 0 auto; padding: 26px 24px 70px; }
.portal-route[data-view="osoblje"] .portal-main { max-width: 1440px; }
.portal-section { padding-top: 12px; scroll-margin-top: 55px; }
.portal-section + .portal-section, #management > .portal-section { margin-top: 28px; padding-top: 30px; border-top: 1px solid var(--border); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 26px; }
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.toolbar h1, .toolbar h2 { margin: 0; }
.toolbar .spacer { flex: 1; }
.page-heading h1 { margin: 4px 0 0; font-size: 25px; font-weight: 600; letter-spacing: -.02em; }
.section-eyebrow { margin-bottom: 7px; }
.live-state { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
h2 { margin: 30px 0 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .75px; text-transform: uppercase; }
.portal-section > h2:first-child { margin-top: 2px; }
.section-copy { max-width: 760px; margin: -3px 0 17px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; }
.cards:empty::before { content: "Još nema podataka."; grid-column: 1 / -1; padding: 22px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 13px; }
.card { position: relative; min-height: 96px; padding: 18px 20px 18px 23px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--accent), var(--violet)); }
.card strong { display: block; margin-bottom: 9px; font-size: 15px; font-weight: 600; }
.card span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.clickable { cursor: pointer; }
.clickable:hover { border-color: var(--accent); transform: translateY(-1px); }

.table-wrap { overflow-x: auto; }
table { width: 100%; overflow: hidden; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
th, td { padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: left; }
th { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.panel-form { max-width: none; margin: 16px 0 18px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); align-items: end; gap: 14px; }
.inline-form label { margin: 0; }
.inline-form input, .inline-form select { margin-bottom: 0; }
.inline-form button { min-height: 43px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(220px,1fr)); gap: 0 20px; }
.form-grid-3 { grid-template-columns: repeat(3,minmax(180px,1fr)); }
.form-actions, .action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.check-line { display: flex; align-items: center; gap: 9px; min-height: 43px; color: var(--text); }
.check-line input { width: auto; margin: 0; }
.report-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 14px 0 18px; }
.report-filter label { min-width: 160px; margin: 0; }
.report-filter input { margin: 7px 0 0; color-scheme: dark; }
.report-filter button { min-height: 43px; }
.report-cards .card { min-height: 88px; }
.report-cards .card span { display: block; margin-bottom: 8px; }
.report-cards .card strong { margin: 0; font-size: 24px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.state-on { color: #77d9a0; }
.state-off { color: #ef9898; }
.state-badge { display: inline-flex; align-items: center; gap: 7px; width: max-content; max-width: 100%; padding: 5px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.state-badge::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .86; }
.state-badge.state-on { border-color: rgba(46,160,97,.42); background: rgba(46,160,97,.15); color: #7be0a5; }
.state-badge.state-off { border-color: rgba(199,70,70,.45); background: rgba(199,70,70,.15); color: #f29b9b; }
.state-badge.state-wait { border-color: rgba(222,166,49,.44); background: rgba(222,166,49,.14); color: #f2ca70; }
.status-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.licence-controls { display: grid; grid-template-columns: 1fr minmax(145px,auto); align-items: center; gap: 10px; margin-top: 15px; }
.licence-controls .small { grid-column: 1 / -1; justify-self: start; margin-top: 0; }
.licence-controls input[type=date] { margin: 0; color-scheme: dark; }
.terminal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.terminal-fiscal { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.terminal-fiscal summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.terminal-fiscal-form { display: grid; grid-template-columns: repeat(2,minmax(180px,1fr)); gap: 12px; margin-top: 12px; }
.terminal-fiscal-form label { margin: 0; }
.terminal-fiscal-form .check-line, .terminal-fiscal-form button { align-self: end; }
.licence-panel #licence-terminals { grid-template-columns: repeat(auto-fit,minmax(min(100%,520px),1fr)); margin-top: 18px; }
fieldset { margin: 10px 0 20px; border: 1px solid var(--border); border-radius: 9px; }
legend { padding: 0 8px; color: var(--muted); font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 7px 18px; }
.checks label { display: flex; align-items: center; gap: 8px; margin: 5px; color: var(--text); }
.checks input { width: auto; margin: 0; }
.small { margin-top: 14px; padding: 7px 11px; font-size: 12px; }
.danger { background: var(--danger); }
.top-gap { margin-top: 18px; }
#pair-code { color: #f0c45c; font-size: 18px; font-weight: 700; letter-spacing: 1.5px; }
.empty { padding: 20px 22px; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); line-height: 1.6; }
.setup-empty { display: grid; justify-items: start; gap: 10px; margin: 16px 0; }
.setup-empty strong { color: var(--text); font-size: 18px; }
.setup-empty .btn { display: inline-block; margin-top: 4px; text-decoration: none; }
.field-hint { margin: -5px 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(5,12,22,.78); backdrop-filter: blur(3px); }
.modal-card { width: min(760px,100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 25px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.modal-heading { margin-bottom: 20px; }
.modal-error { margin-top: -6px; }
.contact-cell { min-width: 190px; white-space: pre-line; line-height: 1.5; }
.icon-close { min-width: 40px; padding: 5px 11px; background: var(--surface-alt); color: var(--muted); font-size: 24px; line-height: 1.2; }
.modal-actions { justify-content: flex-end; margin-top: 8px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 230px; }
.table-actions .small { margin: 0; white-space: nowrap; }
.credential-card { width: min(560px,100%); }
.credential-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 12px 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt); }
.credential-row span { color: var(--muted); font-size: 13px; }
.credential-row strong { color: var(--accent); font-family: Consolas,monospace; font-size: 22px; letter-spacing: .08em; overflow-wrap: anywhere; text-align: right; }
#osoblje .table-wrap { overflow: visible; }
#osoblje table { display: block; min-width: 0; overflow: visible; border: 0; background: transparent; }
#osoblje thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
#osoblje tbody { display: grid; gap: 14px; }
#osoblje tbody tr { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
#osoblje tbody td { min-width: 0; padding: 13px 16px; border-bottom: 0; overflow-wrap: anywhere; }
#osoblje tbody td::before { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .55px; text-transform: uppercase; }
#osoblje tbody td:nth-child(1)::before { content: "Ime i prezime"; }
#osoblje tbody td:nth-child(2)::before { content: "Adresa"; }
#osoblje tbody td:nth-child(3)::before { content: "JMBG"; }
#osoblje tbody td:nth-child(4)::before { content: "Email"; }
#osoblje tbody td:nth-child(5)::before { content: "Uloga"; }
#osoblje tbody td:nth-child(6)::before { content: "PIN"; }
#osoblje tbody td:nth-child(7)::before { content: "Status"; }
#osoblje tbody td:first-child { font-size: 15px; font-weight: 600; }
#osoblje tbody td[colspan] { grid-column: 1 / -1; padding: 20px; color: var(--muted); font-weight: 400; }
#osoblje tbody td[colspan]::before { display: none; }
#osoblje .table-actions { grid-column: 1 / -1; min-width: 0; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-alt); }
#osoblje .table-actions::before { content: none; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(430px,calc(100vw - 48px)); margin: 0; padding: 13px 16px; border: 1px solid rgba(199,70,70,.5); border-radius: 9px; background: #42252a; color: #ffd1d1; box-shadow: 0 12px 35px rgba(0,0,0,.35); white-space: pre-line; }
.toast:empty { display: none; }

body.portal-route [hidden] { display: none !important; }

@media (max-width: 950px) {
  .signin-shell { grid-template-columns: 1fr; }
  .signin-intro { min-height: 47vh; padding: 32px 34px; border-right: 0; border-bottom: 1px solid var(--border); }
  .intro-copy { margin: 70px 0 35px; }
  .intro-copy h1 { max-width: 700px; font-size: clamp(35px,7vw,54px); }
  .signin-panel { min-height: 53vh; padding: 58px 30px; }
  .topbar { flex-wrap: wrap; }
  .topbar .spacer { display: none; }
  .scope-picker { order: 8; width: 100%; margin: 2px 0 0; }
  .who { margin-left: auto; }
}

@media (max-width: 700px) {
  .signin-shell, .signin-intro, .signin-panel { min-width: 0; width: 100%; }
  .signin-intro { min-height: auto; padding: 25px 23px 30px; }
  .signin-logo img { width: 40px; height: 40px; }
  .intro-copy { margin: 42px 0 24px; }
  .intro-copy h1 { overflow-wrap: anywhere; }
  .intro-copy > p:not(.signin-eyebrow) { font-size: 15px; }
  .portal-benefits { margin-top: 24px; }
  .signin-panel { display: block; min-height: auto; padding: 42px 22px; }
  .signin, .signin-foot { width: 100%; max-width: 100%; min-width: 0; }
  .topbar {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto;
    grid-template-areas: "logo title logout" "scope scope scope" "who who account";
    gap: 11px 10px;
    padding: 12px 15px;
  }
  .topbar > img { grid-area: logo; }
  .topbar .title { font-size: 14px; }
  .topbar .title { grid-area: title; align-self: center; }
  .topbar #logout { grid-area: logout; padding: 8px 11px; }
  .pill { display: none; }
  .scope-picker { grid-area: scope; width: 100%; min-width: 0; margin: 1px 0 0; }
  .who { grid-area: who; width: auto; min-width: 0; margin: 2px 0 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .account-link { grid-area: account; align-self: center; margin: 0; }
  .nav { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 6px; overflow: visible; }
  .nav a { display: grid; place-items: center; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 7px; background: var(--surface-alt); font-size: 12.5px; line-height: 1.25; white-space: normal; text-align: center; }
  .nav a.on { background: rgba(56,142,224,.18); box-shadow: inset 0 0 0 1px rgba(56,142,224,.45); }
  .portal-main { padding: 21px 15px 55px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .cards, .form-grid, .inline-form, .terminal-fiscal-form { grid-template-columns: 1fr; }
  .inline-form input, .inline-form select { margin-bottom: 12px; }
  input, select { font-size: 16px; }
  .toolbar { align-items: flex-start; flex-wrap: wrap; }
  .toolbar .spacer { display: none; }
  .toolbar > button { margin-left: auto; }
  .table-wrap { overflow: visible; }
  .table-wrap table { display: block; min-width: 0; overflow: visible; border: 0; background: transparent; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .table-wrap tbody { display: grid; gap: 12px; }
  .table-wrap tbody tr { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
  .table-wrap tbody td { display: grid; grid-template-columns: minmax(105px,38%) minmax(0,1fr); gap: 13px; width: 100%; min-width: 0; padding: 11px 13px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; text-align: left; }
  .table-wrap tbody td::before { content: attr(data-label); color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .45px; text-transform: uppercase; }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td[colspan] { display: block; padding: 18px; color: var(--muted); }
  .table-wrap tbody td[colspan]::before { display: none; }
  .table-wrap .table-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
  .table-wrap .table-actions::before { flex: 0 0 100%; content: attr(data-label); }
  .table-wrap .table-actions:empty::before { margin: 0; }
  .panel-form { padding: 16px; }
  .licence-controls { grid-template-columns: 1fr; }
  .licence-controls .small { grid-column: auto; width: 100%; }
  .report-filter { align-items: stretch; }
  .report-filter label, .report-filter button { width: 100%; }
  .modal-back { place-items: end center; padding: 0; }
  .modal-card { width: 100%; max-height: 100dvh; padding: 19px 17px; border-width: 1px 0 0; border-radius: 15px 15px 0 0; }
  .modal-heading { flex-wrap: nowrap; }
  .modal-heading .icon-close { margin-left: auto; }
  .modal-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .modal-actions button { width: 100%; }
  .credential-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .credential-row strong { max-width: 100%; text-align: left; }
  #pair-code { width: 100%; font-size: 16px; }
  #osoblje > .toolbar { align-items: flex-start; flex-wrap: wrap; }
  #osoblje tbody tr { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 430px) {
  .topbar { grid-template-columns: 34px minmax(0,1fr) auto; grid-template-areas: "logo title logout" "scope scope scope" "who who who" "account account account"; }
  .nav a { min-height: 40px; padding: 7px 8px; font-size: 12px; }
  .portal-main { padding-right: 11px; padding-left: 11px; }
  .table-wrap tbody td { grid-template-columns: 1fr; gap: 4px; }
  .modal-actions { grid-template-columns: 1fr; }
  #osoblje tbody tr { grid-template-columns: 1fr; }
}
