/* PrintON CMS - jednostavan, pregledan admin. Isti brend kao stranica, ali neutralniji. */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/inter/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/inter/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/inter/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/inter/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(/fonts/poppins/poppins-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(/fonts/poppins/poppins-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --red: #eb2029; --red-50: #fdeced; --ink: #111; --bg: #f5f4f2; --card: #fff; --line: #e6e2dc; --muted: #6b665f;
  --ok: #1a7f37; --ok-50: #e7f5ec; --warn: #9a6700; --warn-50: #fff4d6; --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: 'Poppins', system-ui, sans-serif; font-weight: 600; letter-spacing: -.015em; margin: 0; }
h1 { font-size: 24px; line-height: 1.25; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* Raspored */
.shell { display: grid; min-height: 100vh; }
@media (min-width: 960px) { .shell { grid-template-columns: 240px 1fr; } }
.side { background: var(--ink); color: #d6d2cc; display: flex; flex-direction: column; gap: 8px; padding: 14px; }
@media (min-width: 960px) { .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; } }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: #fff; text-decoration: none; font: 600 17px 'Poppins', sans-serif; }
.side__brand svg { width: 34px; height: 18px; }
.side__nav { display: flex; gap: 2px; overflow-x: auto; }
@media (min-width: 960px) { .side__nav { flex-direction: column; overflow: visible; flex: 1; } }
.side__nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; white-space: nowrap; font-size: 14px; }
.side__nav a:hover { background: #222; color: #fff; }
.side__nav a.is-on { background: #262626; color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.side__label { display: none; margin: 16px 10px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8b857e; }
@media (min-width: 960px) { .side__label { display: block; } }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
.side__user { display: none; border-top: 1px solid #2a2a2a; padding-top: 12px; font-size: 13px; }
@media (min-width: 960px) { .side__user { display: flex; justify-content: space-between; align-items: center; gap: 8px; } }
.side__user a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__user button { background: none; border: 0; color: #8b857e; cursor: pointer; padding: 4px; }
.side__user button:hover { color: #fff; }
.main { padding: 20px 16px 64px; min-width: 0; max-width: 1280px; }
@media (min-width: 960px) { .main { padding: 28px 40px 80px; } }

.page-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.page-top--sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-block: 12px; margin-top: -12px; border-bottom: 1px solid transparent; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.back { font-size: 13px; color: var(--muted); text-decoration: none; }

/* Elementi */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: #c00510; border-color: #c00510; }
.btn--block { width: 100%; }
.btn--ghost-danger { background: none; border-color: transparent; color: var(--red); }
.btn--ghost-danger:hover { border-color: var(--red); }
.link { color: var(--red); font-weight: 600; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 13px; text-decoration: none; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips--anchors { margin-bottom: 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash--ok { background: var(--ok-50); color: var(--ok); }
.flash--err { background: var(--red-50); color: var(--red); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel--flush { padding: 0; overflow-x: auto; }
.panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel__head h2, .panel__title { font-size: 16px; margin-bottom: 12px; }
.panel__head h2 { margin: 0; }
.panel__head a { font-size: 13px; color: var(--muted); }
.narrow { max-width: 520px; }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; display: grid; gap: 4px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font: 600 30px/1 'Poppins', sans-serif; }
.kpi--hot { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.cols { display: grid; gap: 16px; }
@media (min-width: 1100px) { .cols { grid-template-columns: 1.6fr 1fr; } }
.misses { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.misses li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; background: var(--bg); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; }
.table--click tbody tr { cursor: pointer; }
.table--click tbody tr:hover { background: #faf9f7; }
.table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.thumb { height: 32px; width: auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d4cfc8; }
.dot--on { background: var(--ok); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); text-transform: capitalize; }
.pill--novo, .pill--draft { background: var(--warn-50); color: var(--warn); }
.pill--published, .pill--zatvoreno { background: var(--ok-50); color: var(--ok); }
.pill--u-obradi, .pill--ponuda-poslana { background: #e8f0fe; color: #1a56c4; }
.search input { height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); min-width: 220px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.pager a { padding: 6px 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.pager a.is-on { background: var(--ink); color: #fff; }

/* Forme */
.edit__grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .edit__grid { grid-template-columns: minmax(0, 1fr) 320px; } .edit__side { position: sticky; top: 90px; } }
.fld { display: grid; gap: 6px; margin-bottom: 16px; }
.fld > span { font-size: 13px; font-weight: 600; }
.fld small { font-size: 12px; color: var(--muted); }
.fld small.demo { color: var(--warn); font-weight: 600; }
.fld small.err { color: var(--red); }
.fld input[type=text], .fld input[type=email], .fld input[type=password], .fld input[type=number], .fld input[type=date], .fld input[type=datetime-local], .fld select, .fld textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff;
}
.fld textarea { resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--ink); }
.fld.is-err input, .fld.is-err textarea { border-color: var(--red); }
.lang-tag { font-style: normal; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--ink); color: #fff; margin-left: 4px; vertical-align: 1px; }
[data-lang-active='bs'] [data-l='en'], [data-lang-active='en'] [data-l='bs'] { display: none; }
.lang-tabs { display: inline-flex; padding: 3px; border-radius: 99px; background: #e9e6e1; }
.lang-tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.lang-tabs button[aria-selected='true'] { background: var(--ink); color: #fff; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #d4cfc8; transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.img-field { display: grid; gap: 8px; }
.img-field img { max-height: 160px; width: auto; border-radius: 8px; border: 1px solid var(--line); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.gallery-field { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.gallery-field__item { display: grid; gap: 4px; font-size: 12px; }
.gallery-field__item img { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; }
.danger { margin-top: 8px; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0 0 20px; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; font-weight: 500; }
.message { white-space: pre-wrap; background: var(--bg); padding: 14px 16px; border-radius: 8px; }
.list { margin: 8px 0; padding-left: 18px; }
.price { font: 600 22px 'Poppins', sans-serif; }
.price small { font: 400 13px 'Inter', sans-serif; color: var(--muted); }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* EasyMDE u skladu s CMS-om */
.EasyMDEContainer .editor-toolbar { border-color: var(--line); border-radius: 8px 8px 0 0; }
.EasyMDEContainer .CodeMirror { border-color: var(--line); border-radius: 0 0 8px 8px; font-size: 15px; }

/* Prijava */
.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login__card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgb(0 0 0 / .08); }
.login__card h1 { margin: 12px 0 4px; }
.login__card > p { margin: 0 0 20px; }
.login__logo { height: auto; margin-bottom: 8px; }
