/* ---------- Font ---------- */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  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: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  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; }

/* ---------- Tokens ---------- */
:root {
  --paper: #EEF1F4;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --ink: #1C2430;
  --ink-2: #2B3644;
  --steel: #566577;
  --line: #D9DFE6;
  --line-2: #E7EBEF;
  --signal: #F2C230;
  --signal-deep: #D9A70F;
  --focus: #2F6FDB;
  --good: #1E6B3A; --good-bg: #DDF1E4;
  --warn: #8A5A00; --warn-bg: #FBEBC8;
  --bad: #A1271C; --bad-bg: #F9DEDC;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --shadow: 0 1px 0 rgba(28,36,48,.04), 0 6px 18px -10px rgba(28,36,48,.25);
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --step--1: .8125rem; --step-0: .9375rem; --step-1: 1.125rem; --step-2: 1.375rem; --step-3: 1.875rem; --step-4: 2.75rem; --step-5: clamp(2.6rem, 6.4vw, 5rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: var(--step-0); line-height: 1.5; color: var(--ink); background: var(--paper); font-stretch: 100%; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-stretch: 112%; letter-spacing: -.01em; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-2); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
small, .muted { color: var(--steel); }
.muted { font-size: var(--step--1); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden, [hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 42px; padding: .55rem 1.05rem; border-radius: var(--r-s);
  border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; font-stretch: 105%;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn-primary:hover { background: var(--signal-deep); border-color: var(--signal-deep); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(28,36,48,.06); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 34px; padding: .3rem .7rem; font-size: var(--step--1); }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: var(--step-1); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Forms ---------- */
.field { display: grid; gap: .35rem; }
.field > span, .label { font-weight: 600; font-size: var(--step--1); font-stretch: 105%; }
.field .hint { font-size: var(--step--1); color: var(--steel); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--surface);
  font: inherit; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(47,111,219,.25); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 1rem; }
.stack-s { display: grid; gap: .5rem; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

/* izbor kao kartice (kanali, usluge) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.choice { position: relative; display: flex; gap: .7rem; align-items: center; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); cursor: pointer; font-weight: 600; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #FFFBEA; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice .tick { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; }
.choice input[type=radio] ~ .tick { border-radius: 50%; }
.choice:has(input:checked) .tick { background: var(--ink); border-color: var(--ink); }
.choice:has(input:checked) .tick::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.choice small { display: block; font-weight: 400; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.25rem; }
.card-tight { padding: .9rem 1rem; }
.card h2, .card h3 { margin-bottom: .75rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.card-head h2, .card-head h3 { margin: 0; }
.panel-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { padding: 2rem 1rem; text-align: center; color: var(--steel); }
.empty strong { display: block; color: var(--ink); font-size: var(--step-1); margin-bottom: .25rem; }
.divider { height: 1px; background: var(--line-2); margin: .5rem 0; }

/* ---------- Status ---------- */
.chip { display: inline-flex; align-items: center; gap: .4em; padding: .18rem .6rem; border-radius: 999px; font-size: var(--step--1); font-weight: 650;
  white-space: nowrap; background: #E6E9ED; color: #46525F; font-stretch: 105%; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.st-novo { background: #DCE7FB; color: #1D4FAF; }
.st-ponuda { background: #E8E1FB; color: #5B3CC4; }
.st-prihvaceno { background: #D7F0EE; color: #136B63; }
.st-priprema { background: #FBEBC8; color: #8A5A00; }
.st-izrada { background: #FCE0CC; color: #9A4310; }
.st-zavrseno { background: #D9F0E0; color: #1E6B3A; }
.st-poslano { background: #D5EEF6; color: #0E6585; }
.st-preuzeto { background: #E6E9ED; color: #46525F; }
.st-odbijeno { background: #F9DEDC; color: #A1271C; }
.tag-good { background: var(--good-bg); color: var(--good); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
th { text-align: left; font-weight: 650; font-size: var(--step--1); color: var(--steel); padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; font-stretch: 105%; }
td { padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #FAFBFC; }

/* ---------- Toast & modal ---------- */
#toasts { position: fixed; z-index: 100; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; width: min(92vw, 440px); }
.toast { background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: var(--r-m); box-shadow: var(--shadow); font-weight: 500; animation: toast-in .2s ease-out; }
.toast.err { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(20,26,34,.55); display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--r-l); width: min(100%, 560px); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.5rem; box-shadow: var(--shadow); }
.modal.wide { width: min(100%, 860px); }
.modal h2 { margin-bottom: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* ---------- Brand mark: slojevi štampe ---------- */
.mark { width: 30px; height: 30px; border-radius: 7px; background: var(--signal); display: grid; align-content: end; padding: 6px 6px 5px; gap: 2px; flex: none; }
.mark i { display: block; height: 3px; border-radius: 2px; background: var(--ink); }
.mark i:nth-child(1) { width: 40%; margin-left: 30%; }
.mark i:nth-child(2) { width: 70%; margin-left: 15%; }
.mark i:nth-child(3) { width: 100%; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; font-stretch: 118%; font-size: 1.05rem; letter-spacing: -.01em; }

/* ---------- Galerija ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.gallery a, .gallery .thumb { aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; text-decoration: none; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .file { font-size: var(--step--1); padding: .5rem; text-align: center; word-break: break-all; color: var(--steel); }
.gallery .file b { display: block; color: var(--ink); font-size: var(--step-0); margin-bottom: .2rem; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(28,36,48,.8); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }

.dropzone { border: 2px dashed var(--line); border-radius: var(--r-m); padding: 1.5rem 1rem; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: #FFFBEA; }
.dropzone strong { display: block; font-size: var(--step-1); }

/* ---------- Vremenska linija ---------- */
.timeline { display: grid; gap: .1rem; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: .75rem; padding: .55rem 0; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); margin-top: .35rem; box-shadow: 0 0 0 3px var(--surface); }
.tl-item.status .tl-dot { background: var(--ink); }
.tl-item.ponuda .tl-dot { background: #5B3CC4; }
.tl-item.biljeska .tl-dot { background: var(--signal-deep); }
.tl-item.uplata .tl-dot { background: var(--good); }
.tl-body { min-width: 0; }
.tl-meta { font-size: var(--step--1); color: var(--steel); }
.bubble { margin-top: .3rem; padding: .6rem .8rem; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line-2); white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { background: #FFFBEA; border-color: #F3E2A4; }
.bubble.note { background: #FFF6DA; border-style: dashed; border-color: #E5C65E; }

/* ---------- Napredak (klijent) ---------- */
.progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: .5rem 0 .25rem; }
.progress i { height: 8px; border-radius: 4px; background: var(--line); }
.progress i.on { background: var(--ink); }
.progress i.now { background: var(--signal); box-shadow: inset 0 0 0 1.5px var(--ink); }
.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps-v li { display: grid; grid-template-columns: 28px 1fr; gap: .7rem; align-items: start; padding-bottom: .9rem; position: relative; color: var(--steel); }
.steps-v li::before { content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.steps-v li:last-child::before { display: none; }
.steps-v .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 700; z-index: 1; }
.steps-v li.done { color: var(--ink); }
.steps-v li.done .dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps-v li.done::before { background: var(--ink); }
.steps-v li.now { color: var(--ink); font-weight: 700; }
.steps-v li.now .dot { background: var(--signal); border-color: var(--ink); color: var(--ink); }
.steps-v .when { display: block; font-weight: 400; font-size: var(--step--1); color: var(--steel); }

/* ---------- Loading ---------- */
.spinner { width: 20px; height: 20px; border: 2.5px solid rgba(28,36,48,.2); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
.page-loading { display: grid; place-items: center; min-height: 40vh; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* ---- Video radovi: kartice ---- */
.vcard { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; display: grid; gap: .55rem; align-content: start; scroll-snap-align: start; min-width: 0; }
.vthumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--r-m); overflow: hidden; background: var(--ink); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.vcard:hover .vthumb img { transform: scale(1.035); }
.vcard:focus-visible { outline: none; }
.vcard:focus-visible .vthumb { outline: 3px solid var(--focus); outline-offset: 3px; }
.vthumb.ph { background: var(--ink) linear-gradient(to top, var(--signal) 0 10px, transparent 10px 20px, var(--signal) 20px 30px, transparent 30px 40px, var(--signal-deep) 40px 50px, transparent 50px) no-repeat; }
.vthumb.ph .mark { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%) scale(1.6); }
.vplay { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--signal); color: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(0,0,0,.55); transition: transform .2s ease; }
.vcard:hover .vplay { transform: scale(1.08); }
.vplay svg { width: 26px; height: 26px; margin-left: 3px; }
.vsrc { position: absolute; left: .55rem; top: .55rem; padding: .12rem .55rem; border-radius: 999px; background: rgba(14,18,24,.75); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .01em; }
.vtitle { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Video plejer (preko cijelog ekrana) ---- */
body.vp-open { overflow: hidden; }
.vplayer { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(12,16,22,.95); color: #fff;
  padding: max(.5rem, env(safe-area-inset-top)) .75rem max(.75rem, env(safe-area-inset-bottom)); }
.vp-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; width: min(100%, 560px); margin-inline: auto; }
.vp-count { font-weight: 650; color: #C9D1DB; font-variant-numeric: tabular-nums; }
.vp-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font: 400 30px/1 var(--sans); cursor: pointer; }
.vp-x:hover { background: rgba(255,255,255,.24); }
.vp-stage { display: grid; place-items: center; min-height: 0; }
.vp-frame { height: 100%; max-height: 860px; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 14px; overflow: hidden; background: #000; }
.vp-frame.instagram { aspect-ratio: auto; width: min(100%, 420px); background: #fff; }
.vp-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.vp-bar { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: .75rem; align-items: center; width: min(100%, 560px); margin: .75rem auto 0; }
.vp-info { display: grid; gap: .2rem; text-align: center; font-size: var(--step--1); }
.vp-info strong { font-size: var(--step-0); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vp-info a { color: var(--signal); font-weight: 650; text-decoration: none; }
.vp-info a:hover { text-decoration: underline; }
.vp-nav { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--signal); color: var(--ink); font: 700 34px/1 var(--sans); padding-bottom: 4px; cursor: pointer; }
.vp-nav:hover { background: var(--signal-deep); }
.vplayer button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
