/* Simex – cjenik. Ozbiljno, čisto: tamna bočna traka (logotip ima bijela slova), svijetla radna površina, brend crvena iz logotipa. */

@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-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: "Inter";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-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 {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #14171c;
  --ink-2: #444b57;
  --muted: #5d6471;
  --line: #e1e4ea;
  --line-2: #eceef2;
  --field-line: #b6bcc8;
  --side: #16181d;
  --side-2: #1f2229;
  --side-ink: #e8eaee;
  --side-muted: #9aa1ae;

  --brand: #ed2024;
  --brand-strong: #d3191d;
  --brand-strong-hover: #b91519;
  --brand-tint: #fdecec;
  --focus: #1f5bff;
  --danger: #b3261e;
  --ok: #0f6a3a;

  --b-1: #fdecec; --t-1: #8f1114; --d-1: #d3191d;
  --b-2: #fff0e3; --t-2: #8a3b00; --d-2: #e8710a;
  --b-3: #fef5d9; --t-3: #7a5600; --d-3: #d99a00;
  --b-4: #eef5d3; --t-4: #4a5e0a; --d-4: #8fb11f;
  --b-5: #e2f3e4; --t-5: #1e5e2b; --d-5: #3ba550;
  --b-6: #ddf1ec; --t-6: #0c5a49; --d-6: #0f8f73;
  --b-7: #dfeaf7; --t-7: #123f73; --d-7: #2a6cb8;
  --b-8: #e4e6eb; --t-8: #3b4150; --d-8: #6b7280;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --side-w: 248px;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #b3bac6 transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); font-feature-settings: "cv05", "cv08", "ss03"; letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--brand); color: #fff; }
input, button { font: inherit; color: inherit; caret-color: var(--brand-strong); }
button { cursor: pointer; }
h1, h2 { margin: 0; text-wrap: balance; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- statusi ---------- */

.tag {
  --b: var(--b-1); --t: var(--t-1); --d: var(--d-1);
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 10px;
  background: var(--b); color: var(--t); border-radius: 999px;
  font-size: 12.5px; font-weight: 550; white-space: nowrap;
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--d); flex: none; }
.s1 { --b: var(--b-1); --t: var(--t-1); --d: var(--d-1); }
.s2 { --b: var(--b-2); --t: var(--t-2); --d: var(--d-2); }
.s3 { --b: var(--b-3); --t: var(--t-3); --d: var(--d-3); }
.s4 { --b: var(--b-4); --t: var(--t-4); --d: var(--d-4); }
.s5 { --b: var(--b-5); --t: var(--t-5); --d: var(--d-5); }
.s6 { --b: var(--b-6); --t: var(--t-6); --d: var(--d-6); }
.s7 { --b: var(--b-7); --t: var(--t-7); --d: var(--d-7); }
.s8 { --b: var(--b-8); --t: var(--t-8); --d: var(--d-8); }
.tag .chev { opacity: 0.7; margin-left: 1px; }
.sw { --d: var(--d-1); width: 8px; height: 8px; border-radius: 50%; background: var(--d); flex: none; }
.sw.s1 { --d: var(--d-1); } .sw.s2 { --d: var(--d-2); } .sw.s3 { --d: var(--d-3); } .sw.s4 { --d: var(--d-4); }
.sw.s5 { --d: var(--d-5); } .sw.s6 { --d: var(--d-6); } .sw.s7 { --d: var(--d-7); } .sw.s8 { --d: var(--d-8); }

/* ---------- gumbi i polja ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px;
  font-weight: 550; font-size: 14px; text-decoration: none; background: transparent;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:disabled { cursor: progress; opacity: 0.65; }
.btn-primary { background: var(--brand-strong); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-strong-hover); }
.btn-block { width: 100%; min-height: 44px; font-size: 15px; }
.btn-quiet { color: var(--ink-2); border-color: transparent; }
.btn-quiet:hover { background: #eceef2; color: var(--ink); }
.btn-danger-quiet { color: var(--danger); margin-left: auto; }
.btn-danger-quiet:hover { background: #fbe9e7; }
.btn-danger-quiet.armed { background: var(--danger); color: #fff; }
.btn-add { min-height: 40px; padding: 0 16px 0 12px; background: var(--brand-strong); color: #fff; }
.btn-add:hover { background: var(--brand-strong-hover); }

.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; background: transparent; border: 0; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: #eceef2; color: var(--ink); }

.field { margin: 0 0 18px; display: block; }
.field-label { display: block; font-size: 13px; font-weight: 550; line-height: 20px; margin-bottom: 6px; color: var(--ink); }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.field input {
  width: 100%; height: 40px; padding: 0 12px; background: #fff;
  border: 1px solid var(--field-line); border-radius: 8px; font-size: 14px; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field select {
  width: 100%; height: 40px; padding: 0 12px; background: #fff;
  border: 1px solid var(--field-line); border-radius: 8px; font-size: 14px; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: auto; cursor: pointer;
}
.field select:hover { border-color: #8b93a1; }
.field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.field input::placeholder { color: #6e7684; }
.field input:hover { border-color: #8b93a1; }
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field.is-set input { border-color: var(--ok); }
.field.is-set .field-hint { color: var(--ok); font-weight: 600; }

.form-alert, .form-ok, .banner { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.form-alert, .banner { background: #fdebe9; color: #7a1410; }
.form-ok { background: #e2f4ea; color: #0b4a2a; }

/* ---------- prijava ---------- */

.login-body { background: var(--surface); }
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-hero { background: var(--side); color: var(--side-ink); padding: clamp(28px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.login-logo { width: min(320px, 70%); height: auto; display: block; }
.login-hero-copy { margin: 0; font-size: 18px; line-height: 1.4; color: var(--side-muted); max-width: 30ch; }
.login-panel { display: grid; place-items: center; padding: 32px 24px; background: var(--surface); }
.login-form { width: min(360px, 100%); }
.login-form h1 { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.024em; }
.login-form .lede { margin: 6px 0 26px; }
.login-single { grid-template-columns: 1fr; background: var(--bg); }
.login-single .login-panel { background: transparent; }
.login-single .login-form { background: #fff; padding: 32px; border-radius: 12px; border: 1px solid var(--line); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 5px; top: 5px; height: 34px; padding: 0 12px; background: transparent; border: 0; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pw-toggle:hover { background: #eceef2; color: var(--ink); }

/* ---------- ljuska aplikacije: izbornik lijevo ---------- */

.app-body { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  background: var(--side); color: var(--side-ink); padding: 22px 14px 14px; z-index: 50;
}
.side-logo { display: block; padding: 4px 8px 22px; border-bottom: 1px solid #2b2f38; margin-bottom: 14px; }
.side-logo img { width: 150px; height: auto; display: block; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 8px;
  color: var(--side-muted); text-decoration: none; font-weight: 500;
}
.nav a svg { flex: none; }
.nav-label { flex: 1; }
.nav-count { min-width: 22px; padding: 0 7px; height: 20px; border-radius: 999px; background: #2b2f38; color: var(--side-ink); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.nav-count:empty { display: none; }
.nav a:hover { background: var(--side-2); color: var(--side-ink); }
.nav a[aria-current="page"] { background: var(--side-2); color: #fff; font-weight: 550; }
.nav a[aria-current="page"] svg { color: var(--brand); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #2b2f38; display: flex; flex-direction: column; gap: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: var(--side-ink); font-weight: 600; min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2b2f38; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; text-transform: uppercase; }
.side-user span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot form { margin: 0; }
.side-foot .btn-quiet { width: 100%; justify-content: flex-start; gap: 12px; padding: 0 12px; color: var(--side-muted); }
.side-foot .btn-quiet:hover { background: var(--side-2); color: #fff; }

.mobilebar { display: none; }
.nav-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(10, 12, 16, 0.55); }

.main-col { min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 32px 32px 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.022em; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.search { position: relative; flex: 0 1 300px; min-width: 220px; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; font-size: 14px; }
.search input::placeholder { color: #6e7684; }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-weight: 550; color: var(--ink-2); transition: background-color 0.15s, border-color 0.15s;
}
.filter b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter:hover { border-color: #aab1bd; color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter[aria-pressed="true"] b { color: #c9cdd6; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: clip; }
.products { width: 100%; border-collapse: collapse; }
.products th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.products td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.products tbody tr:last-child td { border-bottom: 0; }
.products tbody tr:hover td { background: #fafbfc; }
.products .num { text-align: right; }
.brand-name { font-weight: 600; letter-spacing: 0.01em; }
.c-model { font-weight: 500; max-width: 340px; }
.sku { font-variant-numeric: tabular-nums; color: var(--ink-2); font-feature-settings: "tnum", "zero"; }
.c-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.noprice { font-size: 13px; font-weight: 400; color: var(--muted); }
.c-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.c-edit { width: 52px; text-align: right; }
.status-btn { background: transparent; border: 0; padding: 2px; border-radius: 999px; }
.status-btn:hover .tag { filter: brightness(0.96); box-shadow: inset 0 0 0 1px rgba(20, 23, 28, 0.15); }
.row.flash td { animation: flash 2s ease-out; }
@keyframes flash { 0% { background: var(--brand-tint); } 100% { background: transparent; } }

.empty { padding: 56px 24px; text-align: center; }
.empty h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.empty p { margin: 6px auto 20px; max-width: 42ch; color: var(--muted); }

.fab {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 25; width: 56px; height: 56px; border: 0; border-radius: 50%;
  background: var(--brand-strong); color: #fff; box-shadow: 0 6px 16px -4px rgba(20, 23, 28, 0.4); place-items: center;
}
.fab:active { transform: scale(0.96); }

/* ---------- panel ---------- */

.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(20, 23, 28, 0.4); }
.panel {
  position: fixed; top: 50%; left: 50%; z-index: 60; width: min(480px, calc(100% - 32px)); max-height: min(90dvh, 720px);
  transform: translate(-50%, -50%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 28px 60px -20px rgba(20, 23, 28, 0.45), 0 4px 12px rgba(20, 23, 28, 0.08);
  animation: panel-in 0.28s var(--ease);
  display: flex;
}
.panel form { width: 100%; max-height: inherit; display: flex; flex-direction: column; min-height: 0; }
.panel:not([hidden]) { display: flex; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 6px 24px; }
.panel-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 24px 24px; }
.panel-foot { display: flex; gap: 8px; align-items: center; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fafbfc; }
.panel-foot .btn-primary { flex: 1; }
@keyframes panel-in { from { transform: translate(-50%, calc(-50% + 14px)); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: 70px; z-index: 5; margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--ink); border-radius: 8px; box-shadow: 0 14px 28px -10px rgba(20, 23, 28, 0.3);
}
.combo-opt { padding: 9px 12px; border-radius: 6px; font-weight: 550; cursor: pointer; letter-spacing: 0.02em; }
.combo-opt.active, .combo-opt:hover { background: #f0f2f5; }
.combo-opt mark { background: transparent; color: var(--brand-strong); font-weight: 800; }
.combo-opt.create { font-weight: 500; letter-spacing: 0; color: var(--ink-2); border-top: 1px solid var(--line-2); border-radius: 0 0 6px 6px; margin-top: 4px; }
.combo-opt.create b { font-weight: 700; color: var(--ink); }

.money { position: relative; display: block; }
.money input { padding-right: 38px; font-variant-numeric: tabular-nums; }
.money-unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 550; color: var(--muted); }

/* ---------- izbornik statusa i toast ---------- */

.menu {
  position: fixed; z-index: 80; min-width: 230px; padding: 4px; display: flex; flex-direction: column; gap: 1px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 32px -10px rgba(20, 23, 28, 0.3), 0 2px 6px rgba(20, 23, 28, 0.06);
  animation: menu-in 0.16s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 8px; background: transparent; border: 0; border-radius: 7px; text-align: left; }
.menu-item:hover, .menu-item:focus-visible { background: #f0f2f5; }
.menu-item:focus-visible { outline-offset: -2px; }
.menu-item .tick { color: var(--ink); }

.toast {
  position: fixed; left: calc(var(--side-w) + 24px); bottom: 24px; z-index: 90; max-width: min(92vw, 520px);
  transform: translateY(10px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 8px; font-weight: 500; font-size: 14.5px;
  box-shadow: 0 12px 28px -10px rgba(20, 23, 28, 0.5); transition: opacity 0.2s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast:empty { display: none; }

/* ---------- responzivno ---------- */

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 24px; gap: 14px; }
  .login-logo { width: 150px; }
  .login-hero-copy { font-size: 15px; }
}

@media (max-width: 860px) {
  .app-body { display: block; }
  .mobilebar {
    position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 8px 0 6px; display: flex; align-items: center; gap: 4px;
    background: var(--side); color: #fff;
  }
  .mobilebar .icon-btn { color: #fff; }
  .mobilebar .icon-btn:hover { background: var(--side-2); }
  .mobilebar img { height: 34px; width: auto; display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); }
  body.nav-open .sidebar { transform: none; }
  .page { padding: 20px 14px 110px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
  .page-head .btn-add { display: none; }
  .fab { display: grid; }
  body.panel-open .fab { display: none; }
  .search { flex-basis: 100%; }
  .field input, .search input { font-size: 16px; }
  .field input { height: 44px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 6px; width: calc(100% + 28px); }
  .filter { flex: none; }

  .table-wrap { background: transparent; border: 0; border-radius: 0; }
  .products, .products tbody { display: block; }
  .products thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .products tr.row {
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 6px; row-gap: 2px;
    grid-template-areas: "brand price edit" "model model model" "sku sku sku" "status status date";
    margin-bottom: 10px; padding: 12px 6px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  }
  .products td { display: block; padding: 0; border: 0; }
  .products tbody tr:hover td { background: transparent; }
  .c-brand { grid-area: brand; } .c-price { grid-area: price; } .c-edit { grid-area: edit; width: auto; }
  .c-model { grid-area: model; max-width: none; font-size: 16px; }
  .c-sku { grid-area: sku; font-size: 14px; }
  .c-status { grid-area: status; margin: 6px 0 0 -2px; }
  .c-date { grid-area: date; text-align: right; padding-right: 8px; align-self: end; }
  .row.flash { animation: flash-card 2s ease-out; }
  .row.flash td { animation: none; }
  @keyframes flash-card { 0% { background: var(--brand-tint); } 100% { background: var(--surface); } }

  .panel { top: auto; bottom: 0; left: 0; width: 100%; max-height: 94dvh; transform: none; border-width: 1px 0 0; border-radius: 16px 16px 0 0; animation: sheet-in 0.32s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
  .toast { left: 14px; right: 14px; bottom: 84px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- gornja traka i korpa ---------- */

.topbar { position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(245, 246, 248, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; color: var(--ink); font-weight: 550; font-size: 14px; }
.cart-btn:hover { border-color: var(--ink); }
.cart-btn[aria-expanded="true"] { border-color: var(--ink); background: #f0f2f5; }
.cart-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-strong); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-btn.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.1); } 100% { transform: scale(1); } }

.cart-pop {
  position: fixed; z-index: 70; width: min(400px, calc(100vw - 16px)); max-height: min(78dvh, 640px); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 24px 48px -16px rgba(20, 23, 28, 0.4), 0 2px 8px rgba(20, 23, 28, 0.08); animation: menu-in 0.18s var(--ease);
}
.cart-pop[hidden] { display: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px 18px; }
.cart-head h2 { font-size: 16px; font-weight: 600; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.cart-list { list-style: none; margin: 0; padding: 0 8px; overflow-y: auto; flex: 1; min-height: 0; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; }
.cart-item + .cart-item { border-top: 1px solid var(--line-2); }
.ci-title { font-size: 14px; overflow-wrap: anywhere; }
.ci-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.cart-empty { padding: 20px 18px 24px; color: var(--muted); }
.cart-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; background: #fafbfc; border-radius: 0 0 12px 12px; }
.cart-sum { display: flex; align-items: baseline; justify-content: space-between; color: var(--ink-2); }
.cart-sum strong { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }

.stepper { display: inline-flex; align-items: center; height: 32px; border: 1px solid var(--field-line); border-radius: 8px; background: #fff; overflow: hidden; }
.stepper button { width: 30px; height: 100%; border: 0; background: transparent; font-size: 16px; line-height: 1; color: var(--ink-2); }
.stepper button:hover { background: #eceef2; color: var(--ink); }
.stepper span { min-width: 26px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.c-edit { white-space: nowrap; }
.cart-add { color: var(--brand-strong); }
.cart-add:hover { background: var(--brand-tint); color: var(--brand-strong-hover); }
.cart-add:disabled { color: #b6bcc8; cursor: not-allowed; background: transparent; }

/* ---------- kartice i obrazac naloga ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 14px; }
.empty.card { padding: 48px 24px; }
textarea, input[type="date"] {
  width: 100%; padding: 10px 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); resize: vertical;
}
input[type="date"] { height: 40px; padding: 0 12px; width: auto; }
textarea:focus, input[type="date"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
input[type="date"]:disabled { background: #f0f2f5; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.delivery { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input, .chip input { accent-color: var(--brand-strong); width: 16px; height: 16px; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.co-side { position: sticky; top: 76px; }
.co-item { padding: 14px 0; }
.co-item + .co-item { border-top: 1px solid var(--line-2); }
.li-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.li-title { font-size: 15px; }
.li-sub { font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.li-grid { display: grid; grid-template-columns: auto 110px minmax(0, 1fr) auto; gap: 12px 20px; align-items: end; margin-top: 10px; }
.li-cell .field-label { margin-bottom: 4px; }
.pct { position: relative; display: block; }
.pct input { width: 100%; height: 32px; padding: 0 26px 0 10px; border: 1px solid var(--field-line); border-radius: 8px; font-size: 14px; font-variant-numeric: tabular-nums; background: #fff; }
.pct input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.pct input[aria-invalid="true"] { border-color: var(--danger); }
.pct span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; background: #fff; }
.chip:has(input:checked) { border-color: #e9b4b6; background: var(--brand-tint); }
.li-sum { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 110px; }
.li-was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.li-was:empty { display: none; }
.li-total { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.summary { padding: 20px; }
.sum-rows { margin: 0 0 14px; }
.sum-rows > div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sum-rows dt, .sum-rows dd { margin: 0; }
.sum-disc dd { color: var(--ok); font-weight: 550; }
.sum-total { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sum-total span { color: var(--ink-2); font-size: 13px; font-weight: 550; }
.sum-total strong { font-size: 30px; line-height: 1.1; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pay { margin-bottom: 14px; }
.link-btn { margin-top: 6px; padding: 0; background: none; border: 0; color: var(--brand-strong); font-weight: 550; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--brand-strong-hover); }
.sum-remain { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; margin-bottom: 16px; border-radius: 10px; background: var(--ink); color: #fff; }
.sum-remain span { font-size: 13px; font-weight: 550; color: #d4d8e0; }
.sum-remain strong { font-size: 26px; line-height: 1.1; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.sum-remain.is-zero { background: var(--b-5); color: var(--t-5); }
.sum-remain.is-zero span { color: var(--t-5); }
.sum-remain.is-bad { background: var(--danger); }
.btn.busy { opacity: 0.7; cursor: progress; }

/* ---------- nalozi ---------- */

.orders td { vertical-align: top; }
.orders .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.orders .c-no { white-space: nowrap; }
.o-items { display: flex; flex-direction: column; gap: 2px; font-size: 13px; max-width: 280px; }
.remain.due { font-weight: 650; }
.remain.ok { font-weight: 550; color: var(--ok); }
.orders .c-remain .tag { height: 22px; font-size: 11.5px; padding: 0 9px 0 8px; margin-top: 2px; }
.orders .c-paidv { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.orders .c-edit { width: 90px; }
.pdf-btn { color: var(--ink); border-color: var(--line); background: #fff; }
.pdf-btn:hover { border-color: var(--ink); background: #fff; }
.muted { color: var(--muted); }

@media (max-width: 1000px) {
  .checkout { grid-template-columns: 1fr; }
  .co-side { position: static; }
  .li-grid { grid-template-columns: auto 110px 1fr; }
  .li-sum { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; }
}

@media (max-width: 860px) {
  .topbar { display: none; }
  .mobilebar .cart-btn { margin-left: auto; background: transparent; color: #fff; border-color: #3a3f4a; }
  .mobilebar .cart-btn:hover { border-color: #fff; }
  .mobilebar .cart-btn[aria-expanded="true"] { background: var(--side-2); border-color: #fff; }
  .grid-2 { grid-template-columns: 1fr; }
  .li-grid { grid-template-columns: auto 1fr; }
  .li-flags { grid-column: 1 / -1; }
  .card { padding: 16px; }

  .orders tr.row {
    grid-template-areas: "no remain" "cust remain" "tot paidv" "date edit";
    grid-template-columns: 1fr auto;
  }
  .orders .c-no { grid-area: no; }
  .orders .c-cust { grid-area: cust; }
  .orders .c-oitems { grid-area: oitems; margin-top: 6px; }
  .orders .c-price { grid-area: tot; text-align: left; }
  .orders .c-paidv { grid-area: paidv; text-align: right; }
  .orders .c-remain { grid-area: remain; text-align: right; }
  .orders .c-date { grid-area: date; padding-right: 0; text-align: left; align-self: center; }
  .orders .c-edit { grid-area: edit; width: auto; text-align: right; }
  .orders .o-items { max-width: none; }
}
.orders th, .orders td { padding-left: 10px; padding-right: 10px; }
.o-items { max-width: 230px; }

.acts { display: flex; gap: 6px; justify-content: flex-end; }
.orders .c-edit { width: 130px; }
.pdf-btn svg { flex: none; }

/* ---------- prodani artikli ---------- */

.products tbody tr.sold { position: relative; }
.products tr.sold td { color: #9aa1ad; }
.products tr.sold .brand-name, .products tr.sold .sku, .products tr.sold .c-price { color: #9aa1ad; }
.products tr.sold:hover td { background: transparent; }
.products td.c-status { position: relative; }
.sold-mark {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%) rotate(-5deg);
  padding: 1px 10px; border: 2px solid var(--ink); border-radius: 5px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.18em; line-height: 1.3; color: var(--ink);
  opacity: 0.45; pointer-events: none; white-space: nowrap; user-select: none;
}
.icon-btn:disabled, .status-btn:disabled { cursor: not-allowed; }

/* ---------- uređivanje naloga: pretraga artikala i usluge ---------- */

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head .card-title { margin: 0; }
.card-hint { margin: -6px 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.item-search { margin-bottom: 8px; }
.item-search .field { margin-bottom: 4px; }
.item-list { top: 74px; max-height: 340px; overflow-y: auto; }
.item-list .combo-opt { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; letter-spacing: 0; font-weight: 450; }
.item-list .combo-opt .io-main { min-width: 0; overflow-wrap: anywhere; }
.item-list .combo-opt .io-sub { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.co-empty { margin: 4px 0 0; padding: 18px; border: 1px dashed var(--field-line); border-radius: 8px; color: var(--muted); text-align: center; }
.co-empty[hidden] { display: none; }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .sold-mark { left: 76px; }
}

@media (max-width: 1360px) {
  .li-grid { grid-template-columns: auto 110px minmax(0, 1fr); }
  .li-sum { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* ---------- analitika ---------- */

.period { display: inline-flex; padding: 3px; gap: 2px; background: #e6e9ef; border-radius: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.period button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-weight: 550; font-size: 14px; color: var(--ink-2); }
.period button:hover { color: var(--ink); }
.period button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20, 23, 28, 0.12); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.kpi .k { font-size: 13px; font-weight: 550; color: var(--muted); }
.kpi strong { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .d { font-size: 12.5px; color: var(--muted); }
.kpi .d.up { color: var(--ok); font-weight: 550; }
.kpi .d.down { color: var(--danger); font-weight: 550; }

.an-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.an-grid .card + .card { margin-top: 0; }

.chart { margin-top: 6px; }
.plot { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); height: 250px; padding-top: 18px; }
.yaxis { position: relative; margin-bottom: 26px; }
.yaxis span { position: absolute; right: 8px; transform: translateY(50%); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars { position: relative; display: flex; align-items: stretch; gap: 8px; padding-bottom: 26px; }
.bars .gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.bars .gl:last-of-type { background: #b6bcc8; }
.bars.dense { gap: 3px; }
.col { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0; background: transparent; border: 0; font: inherit; color: inherit; text-align: center; }
button.col { cursor: pointer; border-radius: 6px; }
button.col:hover .bar { background: #7d8596; }
button.col.active:hover .bar { background: var(--brand-strong-hover); }
.col .bar { display: block; width: 100%; max-width: 56px; min-height: 0; background: #b6bcc8; border-radius: 4px 4px 0 0; transition: background-color 0.15s; }
.col.active .bar { background: var(--brand-strong); }
.col .bar { position: relative; }
.col .val { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; bottom: 100%; margin-bottom: 3px; }
.col .lab { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; line-height: 26px; }
.bars.dense .col .lab { font-size: 10.5px; }
.col.zero .bar { height: 2px !important; background: var(--line); }

.brand-table { width: 100%; border-collapse: collapse; }
.brand-table th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.brand-table td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.brand-table tr:last-child td { border-bottom: 0; }
.brand-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.brand-table .bn { font-weight: 600; letter-spacing: 0.01em; width: 22%; }
.brand-table .bp { display: flex; align-items: center; gap: 10px; }
.hbar { flex: 0 1 220px; width: 220px; height: 10px; background: #eceef2; border-radius: 5px; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--brand-strong); border-radius: 5px; }
.brand-table td.bp b { font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .period { display: flex; width: 100%; }
  .period button { flex: 1; padding: 0 4px; }
  .plot { height: 220px; grid-template-columns: 38px minmax(0, 1fr); }
  .hbar { display: none; }
  .kpi strong { font-size: 20px; }
}

/* ---------- reklamacije ---------- */

.claim-form .card + .card { margin-top: 16px; }
.claim-form { max-width: 860px; }
.linkbox { margin-bottom: 14px; padding: 14px 14px 6px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; }
.linkbox .field { margin-bottom: 8px; }
.linkbox .field-hint { margin: 0 0 8px; }
.linked { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; padding: 8px 12px; background: var(--b-5); color: var(--t-5); border-radius: 8px; font-size: 14px; }
.linked[hidden] { display: none; }
.linked .link-btn { margin: 0; color: var(--t-5); }
.io-art { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.fieldset .check { display: flex; margin: 6px 0; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.claims td { vertical-align: top; }
.claims .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.claims .c-reason { max-width: 280px; color: var(--ink-2); }
.claims .c-want { font-size: 13px; color: var(--ink-2); max-width: 180px; }
.claims .c-edit { width: 130px; }

@media (max-width: 860px) {
  .claims tr.row { grid-template-areas: "no edit" "cust cust" "art art" "reason reason" "want want"; grid-template-columns: 1fr auto; }
  .claims .c-no { grid-area: no; } .claims .c-cust { grid-area: cust; margin-top: 6px; } .claims .c-art { grid-area: art; font-weight: 550; margin-top: 6px; }
  .claims .c-reason { grid-area: reason; max-width: none; } .claims .c-want { grid-area: want; max-width: none; margin-top: 4px; }
  .claims .c-edit { grid-area: edit; width: auto; }
}

#brands { overflow-x: auto; }
.hbar { flex: 1 1 60px; width: auto; max-width: 240px; min-width: 40px; }
.brand-table td.bp { white-space: nowrap; }
.brand-table td.bp .muted { font-size: 13px; }

/* ---------- ručni unos artikla na nalogu ---------- */

.manual-wrap { margin: 0 0 10px; }
.manual-wrap[hidden] { display: none; }
.manual-box { margin-top: 8px; padding: 14px 14px 10px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; }
.manual-box[hidden] { display: none; }
.manual-box .field-hint { margin: 0 0 10px; }
.manual-box .field { margin-bottom: 12px; }
.manual-box .form-alert { margin-bottom: 10px; }
.manual-actions { display: flex; gap: 8px; }
.tag-manual { display: inline-block; padding: 0 7px; margin-right: 2px; height: 18px; line-height: 18px; border-radius: 999px; background: var(--b-3); color: var(--t-3); font-size: 11.5px; font-weight: 600; }
.combo-opt[data-manual] { cursor: pointer; color: var(--ink); }
.combo-opt[data-manual]:hover { background: var(--tag-soft, #f0f2f5); }

/* ---------- vrsta artikla ---------- */

.products .c-type { color: var(--ink-2); font-size: 13.5px; }
@media (max-width: 860px) {
  .products:not(.orders):not(.claims) tr.row {
    grid-template-areas: "brand price edit" "type type type" "model model model" "sku sku sku" "status status date";
  }
  .products .c-type { grid-area: type; font-size: 13px; color: var(--muted); }
}

/* ---------- etiketa ---------- */

.price-btn { padding: 2px 6px; margin: -2px -6px; background: transparent; border: 0; border-radius: 6px; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; color: inherit; cursor: pointer; text-decoration: underline dotted; text-decoration-color: #aab1bd; text-underline-offset: 4px; white-space: nowrap; }
.price-btn:hover { background: var(--brand-tint); text-decoration-color: var(--brand-strong); }
.price-btn.has-label::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--d-5); vertical-align: middle; }
.products tr.sold .price-btn { color: #9aa1ad; }
.label-panel { width: min(560px, calc(100% - 32px)); z-index: 75; }
#label-scrim { z-index: 72; }
.label-prod { margin: 0 0 14px; font-size: 14.5px; }
.label-prod .muted { font-size: 13px; }
.label-panel textarea { font-size: 13.5px; line-height: 1.5; min-height: 210px; }
.label-status { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; background: #f0f2f5; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c9ced8; border-top-color: var(--brand-strong); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.label-sources { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.label-sources summary { cursor: pointer; font-weight: 550; }
.label-sources ul { margin: 6px 0 0; padding-left: 18px; }
.label-sources a { color: var(--ink-2); overflow-wrap: anywhere; }
.label-codes { margin-top: 4px; }
.banner.warn { background: #fff4d6; color: #6b4a00; }
.settings { max-width: 640px; }
@media (max-width: 860px) { .label-panel { z-index: 75; } }
.label-panel { flex-direction: column; }

/* ---------- skupni odabir ---------- */

.products .c-sel { width: 44px; padding-right: 0; }
.products .c-sel input { width: 17px; height: 17px; accent-color: var(--brand-strong); cursor: pointer; vertical-align: middle; }
.products .c-sel input:disabled { cursor: not-allowed; opacity: 0.4; }
.products tr.row:has([data-sel]:checked) td { background: #fff7f7; }
.bulkbar {
  position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 18px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 0 16px 36px -12px rgba(20, 23, 28, 0.55);
  animation: menu-in 0.2s var(--ease);
}
.bulkbar[hidden] { display: none; }
.bulkbar #bulk-count { font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }
.bulkbar .btn-quiet { color: #d4d8e0; }
.bulkbar .btn-quiet:hover { background: #2b2f38; color: #fff; }
.bulk-list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.bulk-item { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 14px; font-size: 14px; }
.bulk-item + .bulk-item { border-top: 1px solid var(--line-2); }
.bulk-item .bi-state { color: var(--muted); font-size: 13px; text-align: right; }
.bulk-item.busy .bi-state { color: var(--t-3); font-weight: 550; }
.bulk-item.ok .bi-state { color: var(--ok); font-weight: 550; }
.bulk-item.err .bi-state { color: var(--danger); font-weight: 550; }
.bulk-panel { z-index: 76; }
#bulk-scrim { z-index: 73; }
@media (max-width: 860px) {
  .bulkbar { left: 12px; right: 12px; bottom: 84px; transform: none; flex-wrap: wrap; padding: 10px 12px; }
  .bulkbar #bulk-count { flex: 1 0 100%; }
  body[data-view="cijene"] .products:not(.orders):not(.claims) tr.row,
  body[data-view="namjestaj"] .products:not(.orders):not(.claims) tr.row {
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "sel brand price edit" "type type type type" "model model model model" "sku sku sku sku" "status status status date";
  }
  .products .c-sel { grid-area: sel; width: auto; padding-right: 8px; }
}

/* ---------- brzi pregled naloga ---------- */

.qv-panel { width: min(640px, calc(100% - 32px)); z-index: 75; flex-direction: column; }
#qv-scrim { z-index: 72; }
.qv-panel .panel-head { align-items: flex-start; }
.qv-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.qv-info { margin: 0 0 16px; display: grid; gap: 6px; }
.qv-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.qv-row dt { color: var(--muted); }
.qv-row dd { margin: 0; overflow-wrap: anywhere; }
.qv-items { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.qv-items th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.qv-items td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; font-size: 14px; }
.qv-items .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qv-sku { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.qv-flags { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.qv-service td { color: var(--ink-2); }
.qv-totals { display: grid; gap: 4px; padding: 12px 14px; background: #f6f7f9; border-radius: 10px; }
.qv-totals > div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; font-size: 14px; }
.qv-disc { color: var(--ok); }
.qv-total { padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--line); font-size: 15px !important; }
.qv-total strong { font-size: 18px; letter-spacing: -0.015em; }
.qv-remain { margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: #fff; align-items: baseline; }
.qv-remain strong { font-size: 20px; letter-spacing: -0.02em; }
.qv-remain.paid { background: var(--b-5); color: var(--t-5); }
.qv-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); }
@media (max-width: 860px) { .qv-row { grid-template-columns: 96px minmax(0, 1fr); } }

/* ---------- slike artikala ---------- */

.model-btn { display: inline-flex; align-items: center; gap: 8px; padding: 2px 6px; margin: -2px -6px; background: transparent; border: 0; border-radius: 6px; font: inherit; font-weight: 500; color: inherit; text-align: left; cursor: pointer; }
.model-btn:hover { background: #eceef2; }
.cam-chip { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 7px; border-radius: 999px; background: #eceef2; color: var(--ink-2); font-size: 12px; }
.cam-chip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.model-btn.needs .cam-chip { background: var(--brand-tint); color: var(--brand-strong); }
.ph-panel { width: min(640px, calc(100% - 32px)); z-index: 75; }
#ph-scrim { z-index: 72; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ph-item { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eceef2; border: 1px solid var(--line); }
.ph-item a, .ph-item img { display: block; width: 100%; height: 100%; }
.ph-item img { object-fit: cover; }
.ph-del { position: absolute; top: 6px; right: 6px; height: 30px; min-width: 30px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; background: rgba(20, 23, 28, 0.72); color: #fff; font-size: 12.5px; font-weight: 600; }
.ph-item .fp-no { z-index: 1; }
.ph-item .fp-mv { z-index: 1; }
.ph-item { cursor: grab; }
.ph-del:hover { background: rgba(20, 23, 28, 0.9); }
.ph-del.armed { background: var(--danger); }
.ph-del.armed::after { content: "Obriši?"; }
.ph-panel .panel-foot .btn { flex: 1; }
.ph-panel .panel-foot .btn-quiet { flex: 0 1 auto; border-color: var(--line); background: #fff; }
.login-hero { align-items: center; }
.ph-hint { margin-top: 12px; }

/* ---------- WordPress (objava na web shop) ---------- */

.wp-btn { color: #c98a00; }
.wp-btn:hover { background: #fff4d6; color: #a87100; }
.wp-btn.done { color: var(--d-5); }
.wp-btn.done:hover { background: var(--b-5); color: var(--t-5); }
.c-edit { white-space: nowrap; }

/* ---------- korpa: istaknuta tipka skroz desno ---------- */

.products .c-edit .cart-add {
  width: 40px; height: 40px; margin-left: 10px; vertical-align: middle;
  background: var(--brand-strong); color: #fff; border-radius: 10px;
  box-shadow: 0 1px 0 rgba(20, 23, 28, 0.2);
}
.products .c-edit .cart-add:hover { background: var(--brand-strong-hover); color: #fff; }
.products .c-edit .cart-add:active { transform: scale(0.95); }
.products .c-edit .cart-add svg { width: 22px; height: 22px; }
.products .c-edit .cart-add:disabled { background: #e3e6ec; color: #aab1bd; box-shadow: none; cursor: not-allowed; }
.products .c-edit .cart-add:disabled:hover { background: #e3e6ec; color: #aab1bd; }
.products tr.sold .c-edit .cart-add:disabled { opacity: 1; }
@media (max-width: 860px) {
  .products .c-edit { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
  .products .c-edit .icon-btn { width: 44px; height: 44px; }
  .products .c-edit .cart-add { width: 48px; height: 48px; margin-left: 8px; border-radius: 12px; }
  .products .c-edit .cart-add svg { width: 24px; height: 24px; }
}

.wp-btn.sent::after { content: ""; position: absolute; width: 7px; height: 7px; margin: -14px -14px 0 0; border-radius: 50%; background: #c98a00; box-shadow: 0 0 0 2px #fff; }
.wp-btn { position: relative; }
.wp-btn.busy { opacity: 0.55; cursor: progress; }

/* ---------- objava na web shop ---------- */

.wp-panel { width: min(760px, calc(100% - 32px)); z-index: 75; max-height: min(92dvh, 860px); }
#wp-scrim { z-index: 72; }
.wp-warn { margin: 0 0 14px; padding: 10px 14px 10px 30px; background: #fff4d6; color: #6b4a00; border-radius: 8px; font-size: 14px; }
.wp-warn[hidden] { display: none; }
.wp-live { margin: 0 0 14px; padding: 10px 14px; background: var(--b-5); color: var(--t-5); border-radius: 8px; font-size: 14px; }
.wp-live a { color: inherit; font-weight: 600; }
.wp-live[hidden] { display: none; }
.wp-hint { margin: 0 0 14px; }
.wp-h { margin: 18px 0 8px; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.wp-desc-item { padding: 12px 12px 2px; margin-bottom: 10px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; }
.wp-desc-item .field { margin-bottom: 10px; }
.wp-desc-item textarea { min-height: 70px; }
.wp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.wc { font-weight: 400; color: var(--muted); margin-left: 6px; }
.wc.over { color: var(--danger); font-weight: 600; }
.unverified input, .unverified textarea, .wp-desc-item.unverified input, .wp-desc-item.unverified textarea { border-color: #e0a042; background: #fffaf0; }
.unverified .field-hint { color: #8a5a00; }
.wp-label-prev { display: block; width: 180px; height: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.wp-label-prev[hidden] { display: none; }
.wp-dmg { gap: 12px; }
.switch { position: relative; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: #c5cad3; transition: background-color 0.15s; flex: none; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(20, 23, 28, 0.3); transition: transform 0.18s var(--ease); }
.switch[aria-checked="true"] { background: var(--brand-strong); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.c-status { white-space: nowrap; }
@media (max-width: 860px) { .wp-grid { grid-template-columns: 1fr 1fr; } }

.nt-card + .nt-card { margin-top: 16px; }
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.nt-item + .nt-item { border-top: 1px solid var(--line-2); }
.nt-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.nt-sub a { color: var(--ink-2); }
.nt-error { color: var(--danger); margin-top: 3px; }
.nt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nt-empty { padding: 8px 0; }
#nt-done-wrap summary { cursor: pointer; margin: 0; }
.woo-card { margin-top: 16px; }
.woo-result { margin: 14px 0 0; padding: 10px 14px; background: #e2f4ea; color: #0b4a2a; border-radius: 8px; font-size: 14px; }
.woo-result.bad { background: #fdebe9; color: #7a1410; }
.woo-result[hidden] { display: none; }
@media (max-width: 860px) { .nt-item { flex-direction: column; align-items: flex-start; } .nt-actions { justify-content: flex-start; } }

.nn-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
#c-fields[hidden] { display: none; }

.side-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 8px; color: var(--side-muted); text-decoration: none; font-weight: 500; }
.side-link:hover { background: var(--side-2); color: var(--side-ink); }
.side-link[aria-current="page"] { background: var(--side-2); color: #fff; font-weight: 550; }
.side-link[aria-current="page"] svg { color: var(--brand); }
.bell-btn { text-decoration: none; padding: 0 11px; }
.bell-btn[aria-current="page"] { border-color: var(--ink); background: #f0f2f5; }
.bell-btn .cart-badge:empty { display: none; }
.mobilebar .bell-btn { margin-left: auto; background: transparent; color: #fff; border-color: #3a3f4a; }
.mobilebar .bell-btn + .cart-btn { margin-left: 8px; }

.side-user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-user-row .side-user { flex: 1; min-width: 0; }
.side-logout { color: var(--side-muted); flex: none; margin-left: auto; }
.side-logout:hover { background: var(--side-2); color: #fff; }
.meta-ico { display: inline-flex; align-items: center; }
.meta-ico svg { display: block; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.meta-ico .meta-ig { margin-left: -9px; }
.mobilebar .meta-ico svg { box-shadow: 0 0 0 2px #1b1e25; }
.meta-label { font-weight: 600; }
.bell-btn { gap: 10px; }
.bell-btn[aria-current="page"] .meta-ico svg { box-shadow: 0 0 0 2px #f0f2f5; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pager[hidden] { display: none; }
.pager-info { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager-btns { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-gap { padding: 0 4px; color: var(--muted); }
.pager .btn[disabled] { opacity: 0.45; cursor: default; }

/* Meta: stavke za brisanje moraju biti odmah uočljive */
#nt-meta .nt-item { padding: 16px 16px 16px 18px; margin-bottom: 10px; background: #fff5f4; border: 1px solid #f2b8b3; border-radius: 10px; box-shadow: 0 0 0 1px #f2b8b3, 0 2px 8px rgba(214, 40, 30, 0.08); }
#nt-meta .nt-item + .nt-item { border-top: 1px solid #f2b8b3; }
#nt-meta .nt-main b { font-size: 17px; letter-spacing: -0.01em; }
#nt-meta .nt-sub { font-size: 14px; color: var(--ink-2); }
#nt-meta .btn { min-height: 42px; font-weight: 650; }
#nt-err .nt-item { padding: 14px 16px; margin-bottom: 10px; background: #fff9e8; border: 1px solid #ecd28a; border-radius: 10px; }
#nt-err .nt-item + .nt-item { border-top: 1px solid #ecd28a; }

.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nt-chips:empty { display: none; }
.nt-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.nt-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: help; }
.nt-chip.ok { background: #e2f4ea; color: #0b4a2a; }
.nt-chip.warn { background: #fff4d6; color: #6b4a00; }
.nt-progress { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.nt-ig { margin-top: 10px; padding: 12px 14px; background: #fff; border: 1px solid #f2b8b3; border-radius: 8px; }
.nt-ig p { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
.nt-modal { width: min(640px, calc(100% - 32px)); z-index: 75; max-height: min(90dvh, 760px); }
#nt-scrim { z-index: 72; }
.nt-cand { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; }
.nt-cand + .nt-cand { border-top: 1px solid var(--line-2); }
.nt-cand-img { width: 84px; height: 84px; border-radius: 8px; background: #eef0f3; overflow: hidden; }
.nt-cand-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-cand-text { margin: 4px 0 6px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.nt-cand mark { background: #ffe58a; padding: 0 2px; border-radius: 3px; }
@media (max-width: 860px) { .nt-cand { grid-template-columns: 64px 1fr; } .nt-cand-img { width: 64px; height: 64px; } .nt-cand > .btn { grid-column: 1 / -1; } }
.nt-modal:not([hidden]) { flex-direction: column; }

.mp { margin-top: 8px; padding-top: 4px; }
.mp[hidden] { display: none; }
.mp textarea { min-height: 260px; font-size: 14px; line-height: 1.45; }
.mp-chans { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 4px 0 14px; }
.mp-st { font-size: 13px; color: var(--muted); margin-right: 10px; }
.mp-st a { color: var(--ink-2); font-weight: 600; }
#mt-text { min-height: 320px; font-size: 14px; line-height: 1.45; }

#mp-scrim { z-index: 72; }
.meta-ico-sm svg { box-shadow: 0 0 0 2px #fff; width: 18px; height: 18px; }
.meta-ico-sm .meta-ig { margin-left: -8px; }
.meta-btn { position: relative; }
.meta-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.meta-btn.done::after, .meta-btn.part::after { content: ""; position: absolute; width: 8px; height: 8px; right: 3px; top: 3px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.meta-btn.done::after { background: #1f9d55; }
.meta-btn.part::after { background: #c98a00; }

.sk-panel { z-index: 85; }
#sk-scrim { z-index: 82; }
.sk-item { padding: 12px 14px; margin-bottom: 8px; background: #fff5f4; border: 1px solid #f2b8b3; border-radius: 10px; }
.sk-item a { font-size: 14px; }

.wp-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.dmg { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }
.dmg .switch { width: 28px; height: 16px; }
.dmg .switch::after { top: 2px; left: 2px; width: 12px; height: 12px; }
.dmg .switch[aria-checked="true"]::after { transform: translateX(12px); }
.dmg.on { color: var(--danger); font-weight: 600; }
.dmg.locked { cursor: not-allowed; opacity: 0.55; }
.dmg .switch:disabled { cursor: not-allowed; }
.c-status .dmg { display: flex; }
@media (max-width: 860px) { .c-status .dmg { display: inline-flex; margin-left: 10px; } }
.nt-manual { margin: 0 0 16px; padding: 14px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; }
.nt-manual-row { display: flex; gap: 8px; }
.nt-manual-row input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; font-size: 15px; color: var(--ink); }
.nt-manual-row input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.nt-manual .field-hint { margin: 8px 0 0; }

/* ---------- asistent (plutajući chat) ---------- */

.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 58; width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--brand-strong); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 20px -6px rgba(20, 23, 28, 0.5); transition: transform 0.15s var(--ease); }
.chat-fab:hover { transform: scale(1.05); }
.chat-fab:active { transform: scale(0.96); }
.chat-fab[aria-expanded="true"] { background: var(--ink); }
.chat-fab-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 3px #fff; }
.chat-fab-dot[hidden] { display: none; }
.chat-pop { position: fixed; right: 24px; bottom: 96px; z-index: 58; width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -16px rgba(20, 23, 28, 0.45); overflow: hidden; animation: chat-in 0.2s var(--ease); }
.chat-pop[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 18px; background: var(--ink); color: #fff; }
.chat-head b { display: block; font-size: 16px; letter-spacing: -0.01em; }
.chat-head span { display: block; font-size: 12.5px; opacity: 0.7; }
.chat-head-acts { display: flex; align-items: center; gap: 4px; }
.chat-head .btn-quiet { color: #fff; border-color: rgba(255, 255, 255, 0.28); background: transparent; }
.chat-head .btn-quiet:hover { background: rgba(255, 255, 255, 0.12); }
.chat-head .icon-btn { color: #fff; }
.chat-head .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.chat-empty { margin: auto 0; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; font-size: 14px; }
.chat-empty[hidden] { display: none; }
.chat-empty p { margin: 0 0 4px; }
.chat-ex { padding: 8px 14px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink-2); cursor: pointer; max-width: 100%; }
.chat-ex:hover { border-color: var(--ink); color: var(--ink); }
.chat-msg { max-width: 94%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg p { margin: 0 0 8px; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul { margin: 0 0 8px; padding-left: 18px; }
.chat-msg li { margin: 2px 0; }
.chat-msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: #f6f7f9; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg a { color: inherit; text-decoration: underline; }
.chat-src { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.chat-src a { color: var(--ink-2); }
.chat-copy { margin-top: 8px; padding: 2px 10px; background: transparent; border: 1px solid var(--field-line); border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chat-copy:hover { border-color: var(--ink); color: var(--ink); }
.chat-typing { align-self: flex-start; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.chat-pop .form-alert { margin: 0 12px 8px; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fafbfc; align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; padding: 10px 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 10px; font-size: 15px; line-height: 1.4; color: var(--ink); font-family: inherit; }
.chat-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.chat-form .btn { height: 42px; }
.chat-hint { margin: 0; padding: 0 14px 10px; background: #fafbfc; font-size: 12px; color: var(--muted); }
@media (max-width: 860px) {
  .chat-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  body[data-view="cijene"] .chat-fab, body[data-view="namjestaj"] .chat-fab { bottom: 84px; }
.products.furn .c-brand, .products.furn .c-sel, .products .m-type.is-furn { display: none; }
  .chat-fab { width: 48px; height: 48px; }
  .chat-fab svg { width: 22px; height: 22px; }
  .chat-pop { right: 8px; left: 8px; width: auto; bottom: 8px; height: min(82dvh, 640px); }
  body.chat-open .chat-fab { display: none; }
}

/* ---------- popis artikala na telefonu: kompaktnije, bez izlaska iz kartice ---------- */
@media (max-width: 860px) {
  .products:not(.orders):not(.claims) tr.row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand price" "model model" "sku edit" "status date";
    padding: 12px 10px 12px 14px;
  }
  .products:not(.orders):not(.claims) .c-sku { align-self: center; min-width: 0; }
  .products:not(.orders):not(.claims) .c-edit { gap: 0; margin-right: -4px; align-self: center; }
  .products:not(.orders):not(.claims) .c-edit .icon-btn { width: 36px; height: 36px; }
  .products:not(.orders):not(.claims) .c-edit .icon-btn svg { width: 18px; height: 18px; }
  .products:not(.orders):not(.claims) .c-edit .cart-add { width: 42px; height: 42px; margin-left: 6px; border-radius: 10px; }
  .products:not(.orders):not(.claims) .c-edit .cart-add svg { width: 21px; height: 21px; }
  .products:not(.orders):not(.claims) .c-edit .meta-ico-sm svg { width: 16px; height: 16px; box-shadow: 0 0 0 1.5px #fff; }
  .products:not(.orders):not(.claims) .c-edit .meta-ico-sm .meta-ig { margin-left: -7px; }
  .products:not(.orders):not(.claims) .c-edit .wp-btn svg { width: 21px; height: 12px; }
  .meta-btn.done::after, .meta-btn.part::after { right: 2px; top: 2px; width: 7px; height: 7px; }
  .wp-btn.sent::after { margin: -12px -12px 0 0; }
  .products:not(.orders):not(.claims) .c-date { padding-right: 0; }
}

/* ---------- nalozi na telefonu: kartica s jasnim oznakama ---------- */
@media (max-width: 860px) {
  .products.orders tr.row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "no remain" "cust remain" "tot paidv" "date edit";
    row-gap: 4px; padding: 12px 12px 12px 14px;
  }
  .products.orders td { padding: 0; }
  .products.orders .c-no { font-size: 15px; }
  .products.orders .c-cust { margin-bottom: 4px; }
  .products.orders .c-cust b { font-size: 15.5px; }
  .products.orders .c-price, .products.orders .c-paidv { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 15px; }
  .products.orders .c-price::before, .products.orders .c-paidv::before, .products.orders .c-remain::before { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
  .products.orders .c-price::before { content: "Ukupno"; }
  .products.orders .c-paidv::before { content: "Plaćeno"; }
  .products.orders .c-remain { align-self: start; }
  .products.orders .c-remain::before { content: "Za naplatu"; margin-bottom: 2px; }
  .products.orders .c-date { color: var(--ink-2); font-size: 13.5px; align-self: center; }
  .products.orders .c-date::before { content: "Isporuka: "; color: var(--muted); }
  .products.orders .c-edit { align-self: center; margin-top: 6px; }
  .products.orders .acts { gap: 4px; }
  .products.orders .c-edit .btn { padding: 0 10px; min-width: 38px; }
}

/* ---------- početna ---------- */

.home-h { margin: 22px 0 10px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.home-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-bar .period { margin-bottom: 8px; }
.home-note { margin: 0 0 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; }
.qbtn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; background: var(--surface); border: 1px solid var(--field-line); border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; transition: border-color 0.15s, transform 0.12s var(--ease); }
.qbtn:hover { border-color: var(--ink); }
.qbtn:active { transform: scale(0.98); }
.qbtn svg { color: var(--muted); flex: none; }
.qbtn-main { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.qbtn-main svg { color: #fff; }
.qbtn-main:hover { background: var(--brand-strong-hover); border-color: var(--brand-strong-hover); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.12s var(--ease); }
.tile:hover { border-color: var(--ink); }
.tile:active { transform: scale(0.99); }
.tile strong { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile .tl { font-weight: 600; font-size: 14.5px; }
.tile .th { font-size: 12.5px; color: var(--muted); }
.tile.zero strong { color: #aab1bd; }
.tile.warn { background: #fff5f4; border-color: #f2b8b3; }
.tile.warn strong { color: var(--brand-strong); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.home-grid .card + .card { margin-top: 0; }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.top-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14.5px; }
.top-list .bn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list .hb { height: 8px; background: #eceef2; border-radius: 99px; overflow: hidden; }
.top-list .hb i { display: block; height: 100%; background: var(--brand-strong); border-radius: 99px; }
.top-list .bv { white-space: nowrap; font-variant-numeric: tabular-nums; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li + li { border-top: 1px solid var(--line-2); }
.recent-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.recent-list a:hover .rn b { text-decoration: underline; }
.recent-list .rn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list .rv { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { display: grid; grid-template-columns: 1fr 1fr; }
  .qbtn { justify-content: flex-start; padding: 0 14px; font-size: 14.5px; }
  .top-list li { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 8px; }
  .home-bar .period { display: flex; width: 100%; }
}

.chat-dbtag { padding: 1px 8px; background: #e2f4ea; color: #0b4a2a; border-radius: 99px; font-weight: 600; font-size: 12px; }

/* ---------- popis artikala: vrsta ispod modela, vodoravno pomicanje i uvijek vidljive radnje na tabletu ---------- */

.products .m-type { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
@media (min-width: 861px) {
  .products:not(.orders):not(.claims) { min-width: 960px; }
  .table-wrap:has(.products:not(.orders):not(.claims)) { overflow-x: auto; overflow-y: visible; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .products:not(.orders):not(.claims) th:last-child,
  .products:not(.orders):not(.claims) td.c-edit { position: sticky; right: 0; z-index: 3; background: var(--surface); box-shadow: -10px 0 10px -10px rgba(20, 23, 28, 0.22); }
  .products:not(.orders):not(.claims) th:last-child { background: #fafbfc; }
}
@media (max-width: 860px) {
  .products:not(.orders):not(.claims) tr.row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand price" "model model" "sku edit" "status date";
  }
  body[data-view="cijene"] .products:not(.orders):not(.claims) tr.row,
  body[data-view="namjestaj"] .products:not(.orders):not(.claims) tr.row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "sel brand price edit" "model model model model" "sku sku sku sku" "status status status date";
  }
}

/* ---------- kategorije u prozoru za objavu ---------- */

.wp-cat-refresh { margin-left: 10px; font-weight: 500; }
#wp-cats-q, #fp-cats-q { width: 100%; height: 38px; padding: 0 12px; margin-bottom: 8px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; font-size: 14px; }
#wp-cats-q:focus, #fp-cats-q:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.22); }
.wp-cats { max-height: 260px; overflow-y: auto; padding: 8px 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; }
.wp-cats ul { list-style: none; margin: 0; padding: 0; }
.wp-cats ul ul { padding-left: 22px; }
.wp-cats li[hidden] { display: none; }
.wp-cats .check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.wp-cat-l0 > li > label span { font-weight: 600; }
#wp-cats-field.unverified .wp-cats { border-color: #e0a042; background: #fffaf0; }

.mt-manual { margin-top: 14px; }
.mt-manual summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.mt-manual[open] summary { margin-bottom: 12px; }


/* ---------- objava namještaja ---------- */
.fp-photos { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.fp-ph { position: relative; flex: 0 0 auto; width: 104px; height: 104px; margin: 0; border-radius: 10px; overflow: hidden; background: #eceef2; border: 1px solid var(--line); cursor: grab; }
.fp-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-no { position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 11px; font-weight: 600; }
.fp-mv { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; }
.fp-mv button { width: 30px; height: 28px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.9); font-size: 20px; line-height: 1; cursor: pointer; }
.fp-mv button:disabled { opacity: 0.35; cursor: default; }
.fp-panel select, .fp-panel textarea { width: 100%; padding: 10px 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 8px; font: inherit; font-size: 15px; }
.fp-panel input[readonly] { background: #f3f4f7; color: #5b6070; }
.fp-caption { white-space: pre-wrap; word-wrap: break-word; margin: 8px 0; padding: 14px; background: #fff; border: 1px solid var(--field-line); border-radius: 10px; font: inherit; font-size: 14.5px; line-height: 1.45; }
.fp-prev-photos { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.fp-prev-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.field-hint.over { color: #b3261e; font-weight: 600; }

/* ---------- tabovi (Postavke) ---------- */
.tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { flex: 0 0 auto; padding: 10px 16px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; color: #5b6070; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 6px; }
.tabpane[hidden] { display: none; }

/* ---------- filtar vrsta: kartice s ikonom u jednom redu ---------- */
.type-chips { display: flex; gap: 8px; margin: 0 0 14px; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.type-chips[hidden] { display: none; }
.type-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 11px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.type-chip:hover { border-color: #8b93a1; color: var(--ink); }
.type-chip svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.type-chip b { font-size: 12.5px; font-weight: 600; opacity: 0.6; }
.type-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.type-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Objave ---------- */
.ob-empty { padding: 28px 8px; text-align: center; color: #5b6070; }
.ob-panel { width: min(640px, 100%); }
.ob-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ob-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #e8ecf2; }
.ob-caption { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; padding: 12px; background: #fff; border: 1px solid var(--field-line); border-radius: 10px; font: inherit; font-size: 14.5px; line-height: 1.45; }

.ob-actions .btn-danger-quiet { margin-left: 0; }
.fp-del { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.ob-actions { flex-wrap: wrap; }

/* ---------- Objave: tablica s redovima ---------- */
.ob-table { width: 100%; border-collapse: collapse; background: #fff; }
.ob-table thead th { padding: 10px 12px; text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ob-table[hidden] { display: none; }
.ob-row { cursor: pointer; border-bottom: 1px solid var(--line); }
.ob-row:hover { background: #f6f7fa; }
.ob-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.ob-row td { padding: 10px 12px; vertical-align: middle; }
.ob-table .c-img { width: 120px; padding-right: 4px; }
.ob-thumb { position: relative; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; background: #e8ecf2; }
.ob-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ob-thumb.noimg::after { content: "Bez slike"; position: absolute; inset: 0; display: grid; place-items: center; color: #6b7080; font-size: 12px; }
.ob-badge { position: absolute; right: 6px; top: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 12px; }
.ob-logo { position: absolute; right: 5px; bottom: 5px; display: block; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, 0.35); }
.ob-logo svg { display: block; width: 100%; height: 100%; }
.ob-table .c-cap p { margin: 0; font-size: 12.5px; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: pre-line; }
.ob-table .c-date { width: 140px; white-space: nowrap; font-size: 13px; color: #4b5160; }
@media (max-width: 860px) {
  .ob-table thead { display: none; }
  .ob-table, .ob-table tbody { display: block; }
  .ob-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "img cap" "img meta"; column-gap: 12px; row-gap: 4px; padding: 12px; align-items: start; }
  .ob-row td { padding: 0; }
  .ob-table .c-img { grid-area: img; width: auto; }
  .ob-thumb { width: 92px; height: 92px; }
  .ob-table .c-cap { grid-area: cap; }
  .ob-table .c-cap p { -webkit-line-clamp: 6; font-size: 12.5px; }
  .ob-table .c-date { width: auto; grid-area: meta; align-self: end; justify-self: end; font-size: 12.5px; }
  .ob-logo { width: 22px; height: 22px; }
}

/* ---------- atributi u obrascu za web ---------- */
.wp-attrs { display: grid; gap: 8px; margin-bottom: 8px; }
.wp-attr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; align-items: center; }
.wp-count { margin-left: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
#wp-attr-hint.unverified { color: #b45309; }
@media (max-width: 560px) { .wp-attr { grid-template-columns: minmax(0, 1fr) auto; } .wp-attr .wp-attr-value { grid-column: 1; } .wp-attr .wp-attr-del { grid-row: 1 / span 2; grid-column: 2; } }

/* ---------- etiketa namještaja: poveznica za istraživanje ---------- */
.label-src-row { display: flex; gap: 8px; }
.label-src-row input { flex: 1; min-width: 0; }

/* ---------- namještaj: Popuni s AI-em ---------- */
.fp-ai { margin: 4px 0 16px; padding: 14px; border: 1px solid #d6cdfa; border-radius: 12px; background: linear-gradient(135deg, #f6f3ff 0%, #eef4ff 100%); }
.fp-ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: #4a2fb8; font-size: 15px; }
.fp-ai .field-hint { margin: 0 0 10px; }
.fp-ai .fp-ai-note { margin: 10px 0 0; color: var(--ink-2); }
.btn-ai { display: inline-flex; align-items: center; gap: 8px; border: 0; color: #fff; font-weight: 600; background: linear-gradient(135deg, #6a3df0 0%, #2f6bff 100%); white-space: nowrap; }
.btn-ai:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ai:disabled { opacity: 0.6; }
.ai-filled { box-shadow: 0 0 0 3px rgba(106, 61, 240, 0.35); transition: box-shadow 0.4s; }
@media (max-width: 560px) { .fp-ai .label-src-row { flex-direction: column; } .btn-ai { justify-content: center; } }