/* Pakirnica – mobitel prvo, velike tipke (rad u rukavicama), malo tipkanja. */
:root {
  --boja: #0E5A63; --boja-tamna: #093F46; --boja-svijetla: #E3F1F2; --naglasak: #F2A20C;
  --tekst: #14252B; --tiho: #5A6B70; --pozadina: #F2F5F6; --kartica: #fff; --rub: #D5DEE0;
  --zeleno: #1E8E3E; --zeleno-poz: #E3F4E7; --zuto: #B26A00; --zuto-poz: #FFF3D6; --crveno: #C5221F; --crveno-poz: #FCE8E6;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 18px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tekst); background: var(--pozadina); -webkit-tap-highlight-color: transparent; }
.ucitavanje { padding: 40vh 16px 0; text-align: center; color: var(--tiho); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select { font: inherit; color: inherit; }

.zaglavlje { position: sticky; top: 0; z-index: 5; background: var(--boja); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 10px; }
.zaglavlje h1 { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zaglavlje .natrag { background: rgba(255,255,255,.16); border: 0; color: #fff; min-width: 52px; height: 52px; border-radius: 12px; font-size: 26px; }
.zaglavlje small { opacity: .85; font-size: 14px; text-align: right; }
main { padding: 16px; max-width: 720px; margin: 0 auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.tipka { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; padding: 12px 18px; border: 0; border-radius: var(--r); background: var(--boja); color: #fff; font-size: 20px; font-weight: 650; cursor: pointer; }
.tipka:active { transform: translateY(1px); background: var(--boja-tamna); }
.tipka.druga { background: var(--kartica); color: var(--boja-tamna); border: 2px solid var(--boja); }
.tipka.tiha { background: transparent; color: var(--boja-tamna); border: 2px solid var(--rub); font-weight: 550; }
.tipka.opasno { background: var(--kartica); color: var(--crveno); border: 2px solid var(--crveno); }
.tipka:disabled { opacity: .5; cursor: default; }
.tipka.mala { min-height: 52px; font-size: 17px; width: auto; padding: 8px 16px; }
.red { display: flex; gap: 10px; } .red > * { flex: 1; }
.razmak { height: 12px; }

.plocice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plocica { min-height: 118px; border: 0; border-radius: var(--r); padding: 14px; text-align: left; color: #fff; background: var(--boja); display: flex; flex-direction: column; justify-content: space-between; font-size: 19px; font-weight: 650; cursor: pointer; }
.plocica .ik { font-size: 34px; line-height: 1; }
.plocica small { font-weight: 450; font-size: 14px; opacity: .9; }
.plocica.velika { grid-column: 1 / -1; min-height: 150px; font-size: 26px; background: var(--naglasak); color: #2A1B00; }
.plocica.velika .ik { font-size: 48px; }
.plocica.b2 { background: #2E6FB7; } .plocica.b3 { background: #7A4FB3; } .plocica.b4 { background: #B4532A; } .plocica.b5 { background: #4D6B2F; } .plocica.b6 { background: #55636A; }
.plocica:disabled { opacity: .55; cursor: default; }
.naslov-grupe { margin: 22px 0 10px; font-size: 15px; font-weight: 700; color: var(--tiho); text-transform: uppercase; letter-spacing: .04em; }

.kartica { background: var(--kartica); border: 1px solid var(--rub); border-radius: var(--r); padding: 16px; }
.polje { display: block; margin-bottom: 14px; }
.polje span { display: block; font-size: 15px; font-weight: 650; color: var(--tiho); margin-bottom: 6px; }
.polje input, .polje select { width: 100%; min-height: 60px; padding: 10px 14px; border: 2px solid var(--rub); border-radius: 12px; background: #fff; font-size: 21px; }
.polje input:focus, .polje select:focus { outline: 0; border-color: var(--boja); }
.polje small { display: block; margin-top: 5px; color: var(--tiho); font-size: 14px; }
.polje.kvacica { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.polje.kvacica input { width: 30px; height: 30px; min-height: 0; flex: none; }
.polje.kvacica span { margin: 0; font-size: 18px; color: var(--tekst); }
.greska { background: var(--crveno-poz); color: var(--crveno); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.napomena { background: var(--boja-svijetla); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 16px; }
.napomena.zuta { background: var(--zuto-poz); color: #5C3A00; }

.prijava { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; max-width: 460px; margin: 0 auto; }
.prijava .znak { width: 92px; height: 92px; margin: 0 auto 14px; display: block; }
.prijava h1 { text-align: center; font-size: 30px; color: var(--boja-tamna); }
.prijava p.pod { text-align: center; color: var(--tiho); margin: 6px 0 24px; }
.prijava .ver { text-align: center; color: var(--tiho); font-size: 13px; margin-top: 18px; }

.popis { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stavka { background: var(--kartica); border: 1px solid var(--rub); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; min-height: 72px; }
.stavka .gl { flex: 1; min-width: 0; }
.stavka b { display: block; font-size: 18px; overflow-wrap: anywhere; }
.stavka small { color: var(--tiho); font-size: 14.5px; display: block; overflow-wrap: anywhere; }
.stavka.iskljucen { opacity: .55; }
.stavka .strelica { color: var(--tiho); font-size: 24px; }
.oznaka { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13.5px; font-weight: 700; background: var(--boja-svijetla); color: var(--boja-tamna); white-space: nowrap; }
.oznaka.admin { background: #EDE3F7; color: #5B2E91; } .oznaka.poslovodja { background: #E1ECF9; color: #1D4F8A; } .oznaka.zuta { background: var(--zuto-poz); color: var(--zuto); } .oznaka.siva { background: #E8ECED; color: var(--tiho); }

#dijalog { position: fixed; inset: 0; z-index: 20; background: rgba(10,25,30,.55); display: flex; align-items: flex-end; justify-content: center; }
#dijalog[hidden] { display: none; }
#dijalog .list { background: var(--pozadina); width: 100%; max-width: 720px; max-height: 94vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
#dijalog h2 { font-size: 22px; margin-bottom: 14px; }
.pin-prikaz { font: 700 44px/1 ui-monospace, Consolas, monospace; letter-spacing: .14em; text-align: center; padding: 18px 8px; background: #fff; border: 2px dashed var(--boja); border-radius: var(--r); margin: 12px 0; user-select: all; }

#toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: #14252B; color: #fff; padding: 14px 20px; border-radius: 14px; font-size: 17px; opacity: 0; pointer-events: none; transition: .2s; max-width: 92vw; text-align: center; z-index: 30; }
#toast.vidi { opacity: 1; transform: translateX(-50%); }
#toast.lose { background: var(--crveno); }
.podnozje { text-align: center; color: var(--tiho); font-size: 13px; margin-top: 26px; }
@media (min-width: 620px) { .plocice { grid-template-columns: repeat(3, 1fr); } #dijalog { align-items: center; } #dijalog .list { border-radius: 20px; } }
