@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url("/fontovi/bricolage-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url("/fontovi/bricolage-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #15302B;
  --night: #0E1F1C;
  --muted: #586C66;
  --line: #D3DCD8;
  --mist: #EDF2EF;
  --pine: #1E6B58;
  --pine-dark: #17574A;
  --amber: #F2A63B;
  --paper: #FFFFFF;
  --danger: #A2362A;
  --traka: 3.5rem;
}

* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  font-family: "Bricolage Grotesque", system-ui, "Segoe UI", sans-serif;
  font-size: 1rem; line-height: 1.45; color: var(--ink); background: var(--mist);
}
h1, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.skriveno { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- dugmad ---------- */
.dugme {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 0.7rem;
  font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.dugme.glavno { background: var(--pine); color: #fff; }
.dugme.glavno:hover { background: var(--pine-dark); }
.dugme.svetlo { background: var(--amber); color: var(--night); min-height: 2.4rem; padding: 0 0.9rem; font-size: 0.92rem; }
.dugme.siroko { width: 100%; }
.dugme[disabled] { opacity: 0.55; cursor: progress; }
.veza { background: none; border: 0; padding: 0.4rem 0; color: inherit; text-decoration: underline; cursor: pointer; font-size: 0.92rem; }

/* ---------- prijava i poruke ---------- */
body.prijava { display: grid; place-items: center; padding: 1.5rem; }
.ulaz { width: 100%; max-width: 22rem; }
.ulaz h1 { font-size: 2.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.ulaz > p { margin: 0.6rem 0 2rem; color: var(--muted); }
.ulaz label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.ulaz input {
  width: 100%; min-height: 3rem; padding: 0 0.9rem; margin-bottom: 0.9rem;
  border: 1.5px solid var(--ink); border-radius: 0.7rem; background: var(--paper);
}
.ulaz .dugme { width: 100%; min-height: 3rem; }
.greska { color: var(--danger); font-weight: 600; margin: -0.3rem 0 0.9rem; }

/* ---------- gornja traka ---------- */
.traka-gore {
  position: sticky; top: 0; z-index: 5; height: var(--traka);
  display: flex; align-items: center; gap: 0.8rem; padding: 0 1rem;
  background: var(--ink); color: #fff;
}
.traka-gore h1 { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.traka-gore form { margin: 0; }
.nazad { color: #fff; text-decoration: none; font-size: 0.92rem; opacity: 0.85; display: inline-flex; align-items: center; min-height: 2.75rem; }
.nazad::before { content: ""; width: 0.5rem; height: 0.5rem; margin-right: 0.35rem; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

/* ---------- spisak ---------- */
.spisak { max-width: 34rem; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.ponude { list-style: none; margin: 1.2rem 0 0; padding: 0; background: var(--paper); border-radius: 0.9rem; overflow: hidden; }
.ponude li + li { border-top: 1px solid var(--line); }
.ponude a { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; padding: 0.9rem 1rem; color: inherit; text-decoration: none; }
.ponude a:hover { background: #F7F9F8; }
.ponude b { font-weight: 650; }
.ponude span { grid-column: 1; color: var(--muted); font-size: 0.92rem; }
.ponude time { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 0.85rem; text-align: right; }
.prazno { margin-top: 2rem; text-align: center; color: var(--muted); }

/* ---------- radni ekran ---------- */
body.radni { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); }
body.radni .traka-gore { flex: none; }
.jezicci { flex: none; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); }
.jezicci button {
  min-height: 2.75rem; border: 0; background: none; color: rgba(255, 255, 255, 0.7);
  font-weight: 600; border-bottom: 3px solid transparent; cursor: pointer;
}
.jezicci button[aria-selected="true"] { color: #fff; border-bottom-color: var(--amber); }
.radna { flex: 1; min-height: 0; display: flex; }
.razgovor, .ponuda { flex: 1; min-width: 0; min-height: 0; }
.radna[data-prikaz="ponuda"] .razgovor, .radna:not([data-prikaz="ponuda"]) .ponuda { display: none; }

.razgovor { display: flex; flex-direction: column; }
.poruke { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.poruke li { max-width: 85%; padding: 0.65rem 0.85rem; border-radius: 1rem; overflow-wrap: anywhere; }
.poruke p { white-space: pre-wrap; }
.poruke .asistent { align-self: flex-start; background: var(--mist); border-bottom-left-radius: 0.3rem; }
.poruke .partner { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 0.3rem; }
.poruke .ceka { color: var(--muted); }
.poruke .nije-uspelo { background: #FBEAE7; color: var(--danger); }
.uz-poruku { display: block; font-size: 0.82rem; opacity: 0.85; }

.unos {
  flex: none; display: flex; align-items: flex-end; gap: 0.5rem;
  padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper);
}
.unos textarea {
  flex: 1; min-width: 0; min-height: 2.75rem; max-height: 9rem; resize: none;
  padding: 0.6rem 0.8rem; border: 1.5px solid var(--line); border-radius: 0.9rem; background: var(--paper); line-height: 1.4;
}
.unos textarea:focus { border-color: var(--ink); outline: none; }
.prilog { flex: none; }
.prilog span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.9rem;
  border: 1.5px solid var(--ink); border-radius: 0.9rem; font-weight: 600; cursor: pointer;
}
.prilog input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.izabrano { flex: none; margin: 0; padding: 0 1rem 0.6rem; font-size: 0.88rem; color: var(--muted); background: var(--paper); }

.ponuda { overflow-y: auto; background: #DDE4E0; padding: 0.8rem; }
.list { position: relative; margin: 0 auto; max-width: 794px; overflow: hidden; background: var(--paper); box-shadow: 0 0.6rem 1.6rem -0.8rem rgba(14, 31, 28, 0.45); }
.list iframe { display: block; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; }

@media (min-width: 60rem) {
  .jezicci { display: none; }
  .radna .razgovor, .radna .ponuda { display: flex !important; }
  .radna .razgovor { flex: 0 0 26rem; border-right: 1px solid var(--line); }
  .radna .ponuda { display: block !important; padding: 1.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .poruke .ceka::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: tacke 1.2s steps(4, end) infinite; }
  @keyframes tacke { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
}
