/* ==========================================================================
   VTK-ŠATVAR B2B katalog – izgled preuzet iz PDF kataloga 2026
   plava #49579d · narančasta #fcb040 · bež #e9dbc6 · crni obrub kartica
   ========================================================================== */

@font-face {
  font-family: "League Spartan";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/league-spartan-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "League Spartan";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/league-spartan-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 {
  --navy: #49579d;
  --navy-dark: #3b4785;
  --navy-deep: #2f3a70;
  --navy-tint: #e6e9f5;
  --orange: #fcb040;
  --orange-dark: #e99a1f;
  --orange-tint: #fff1d9;
  --beige: #e9dbc6;
  --beige-light: #f3eadc;
  --beige-dark: #d9c6a8;
  --ink: #111111;
  --text: #1c1c22;
  --muted: #5d5a55;
  --line: #e4ddd2;
  --white: #ffffff;
  --danger: #b3261e;
  --danger-tint: #fbe4e2;
  --success: #1f6b3d;
  --success-tint: #dcefe2;
  --radius: 16px;
  --radius-sm: 10px;
  --border: 2px solid var(--ink);
  --font-head: "League Spartan", "Arial Rounded MT Bold", Arial, sans-serif;
  --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px -14px rgba(40, 32, 20, .35);
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--beige);
  color: var(--text);
  font: 16px/1.45 var(--font-body);
}
img { max-width: 100%; display: block; }
a { color: var(--navy-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.main { flex: 1; padding-top: 22px; padding-bottom: 48px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border: var(--border); border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: "Consolas", "Menlo", monospace; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-xl { width: 54px; height: 54px; stroke-width: 1.6; color: var(--navy); }
.show-sm { display: none; }

/* ---------- zaglavlje ---------- */
.site-header { background: var(--navy); color: var(--white); }
.header-inner { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; color: var(--white); text-decoration: none; line-height: 1; margin-right: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 24px; letter-spacing: .01em; padding-top: 4px; }
.brand-sub { font-size: 11px; letter-spacing: .38em; margin-top: 6px; opacity: .9; }
.stripe { height: 8px; background: var(--orange); }

.header-search { flex: 1 1 300px; max-width: 460px; display: flex; background: var(--white); border-radius: 999px; padding: 4px; border: 2px solid transparent; }
.header-search:focus-within { border-color: var(--orange); }
.header-search input { flex: 1; border: 0; background: transparent; padding: 8px 14px; min-width: 0; color: var(--ink); }
.header-search input:focus { outline: none; }
.header-search button { border: 0; background: var(--navy); color: var(--white); border-radius: 999px; width: 40px; height: 38px; display: grid; place-items: center; cursor: pointer; }
.header-search button:hover { background: var(--navy-deep); }

.user-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 6px 10px; opacity: .92; max-width: 220px; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .icon { width: 18px; height: 18px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 999px;
  color: var(--white); text-decoration: none; font-size: 15px; font-weight: bold; background: transparent; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-link.is-active { background: rgba(255,255,255,.14); }
.cart-link { background: var(--orange); color: var(--ink); }
.cart-link:hover, .cart-link.is-active { background: #ffc261; }
.logout-form { margin: 0; }
.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--navy-deep); color: var(--white); font-size: 12px; font-weight: bold; line-height: 1;
}
.badge-orange { background: var(--orange); color: var(--ink); }

/* admin podizbornik */
.admin-nav { background: var(--navy-deep); }
.admin-nav-inner { display: flex; gap: 4px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: thin; }
.admin-nav a {
  display: inline-flex; align-items: center; gap: 8px; color: #dfe3f5; text-decoration: none; padding: 9px 14px;
  border-radius: 10px; font-weight: bold; white-space: nowrap; font-size: 15px;
}
.admin-nav a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.admin-nav a.is-active { background: var(--white); color: var(--navy-deep); }
.admin-nav .icon { width: 18px; height: 18px; }

/* traka „Naručujete u ime kupca“ */
.proxy-bar { background: var(--orange); border-bottom: 2px solid var(--ink); }
.proxy-inner { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.proxy-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: var(--white); border: var(--border); border-radius: 999px; }
.proxy-icon .icon { width: 18px; height: 18px; }
.proxy-text { flex: 1 1 260px; font-size: 16px; }
.proxy-text b { font-size: 17px; }
.muted-on-orange { color: #5a3d00; font-size: 14px; }
.proxy-bar .btn-outline { background: var(--white); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-ink:hover { background: #333; }
.panel-proxy { background: linear-gradient(var(--orange-tint), var(--white) 80px); }
.customer-filter { width: 100%; max-width: 420px; padding: 10px 12px; border: 2px solid #cfc6b8; border-radius: var(--radius-sm); min-height: 44px; margin-bottom: 12px; }
.customer-filter:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-tint); }
.table-scroll { overflow-x: auto; }
.table tr.is-current td { background: var(--orange-tint); }
.title-for { font-family: var(--font-body); font-size: 16px; font-weight: bold; background: var(--orange); border: var(--border); border-radius: 999px; padding: 4px 12px; color: var(--ink); }
.summary-list .summary-proxy { background: var(--orange-tint); margin: 0 -8px; padding: 8px; border-radius: 8px; }
.order-created-by { margin: 10px 18px 0; }

/* ---------- podnožje ---------- */
.site-footer { background: var(--navy); color: var(--white); border-top: 8px solid var(--orange); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; letter-spacing: .08em; font-size: 14px; }
.footer-phones { display: flex; flex-direction: column; }
.footer-orders { text-align: right; }
.footer-label { display: block; letter-spacing: .14em; }
.site-footer a { color: var(--white); }

/* ---------- gumbi i polja ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px;
  border-radius: var(--radius-sm); border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: .02em; line-height: 1;
  text-decoration: none; cursor: pointer; transition: background-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn-outline:hover { background: var(--beige-light); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-tint); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-lg { min-height: 52px; font-size: 18px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--line);
  background: var(--white); color: var(--ink); cursor: pointer; text-decoration: none; vertical-align: middle;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; border-color: var(--line); }
.icon-btn-danger { color: var(--danger); }
.icon-btn-danger:hover { border-color: var(--danger); background: var(--danger-tint); }
.link-danger { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--danger); cursor: pointer; padding: 6px 0; font-size: 14px; }
.link-danger .icon { width: 16px; height: 16px; }
.inline-form { display: inline; margin: 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span:first-child, .field-label { font-weight: bold; font-size: 14px; letter-spacing: .02em; }
.field input, .field select, .field textarea, .inline-create input, .rename-form input, .inline-search input {
  width: 100%; padding: 10px 12px; border: 2px solid #cfc6b8; border-radius: var(--radius-sm); background: var(--white); min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus, .inline-create input:focus, .rename-form input:focus, .inline-search input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-tint); }
.field textarea { resize: vertical; min-height: 90px; }
.req { color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.password-wrap { position: relative; display: flex; }
.password-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.pw-gen { flex: none; margin-left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--radius-sm); border: 2px solid var(--ink); background: var(--beige-light); cursor: pointer; font-weight: bold; font-size: 14px; }
.pw-gen:hover { background: var(--orange-tint); }
.pw-gen .icon { width: 16px; height: 16px; }
.password-wrap:has(.pw-gen) input { padding-right: 12px; }

/* ---------- obavijesti ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid; margin-bottom: 14px; font-weight: bold; font-size: 15px; background: var(--white); }
.alert .icon { margin-top: 1px; }
.alert-success { border-color: var(--success); color: var(--success); background: var(--success-tint); }
.alert-error { border-color: var(--danger); color: var(--danger); background: var(--danger-tint); }
.alert-warning { border-color: var(--orange-dark); color: #7a4a00; background: var(--orange-tint); }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 12px; font-weight: bold; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 10px;
}
.toast.is-error { background: var(--danger); }
.hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.hint .icon { width: 18px; height: 18px; color: var(--navy); }

/* ---------- naslovnica (prijava) – kao naslovnica kataloga ---------- */
.page-cover { background: var(--beige); }
.cover { min-height: 100vh; display: flex; flex-direction: column; }
.cover-top { background: var(--navy); color: var(--white); text-align: center; padding: 56px 20px 92px; }
.cover-top p { margin: 0; }
.cover-company { font-family: var(--font-head); font-weight: 600; font-size: clamp(28px, 5vw, 44px); letter-spacing: .01em; }
.cover-word { font-size: clamp(16px, 2.4vw, 22px); letter-spacing: .32em; margin-top: 14px !important; padding-left: .32em; }
.cover-year { font-family: var(--font-head); font-weight: 700; font-size: clamp(56px, 10vw, 92px); line-height: 1; margin-top: 16px !important; }
.cover-stripe { height: 22px; background: var(--orange); }
.cover-mid { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 0 16px 48px; }
.login-card {
  width: 100%; max-width: 440px; margin-top: -84px; background: var(--white); border: var(--border); border-radius: 20px;
  padding: 26px 26px 22px; box-shadow: var(--shadow); position: relative;
}
.login-card h1 { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin: 0 0 6px; color: var(--navy-deep); }
.login-card > p { margin: 0 0 18px; font-size: 14px; }
.cover-bottom { background: var(--navy); color: var(--white); display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 16px 24px; letter-spacing: .1em; font-size: 14px; flex-wrap: wrap; }
.cover-phones { display: flex; flex-direction: column; }
.cover-orders { display: flex; flex-direction: column; align-items: flex-end; }
.cover-orders span { letter-spacing: .16em; }
.cover-orders a { color: var(--white); }

/* ---------- traka kategorija ---------- */
.cat-bar {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px; margin: -10px -2px 10px;
  background: var(--beige); scrollbar-width: thin; scroll-snap-type: x proximity;
}
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: var(--border); border-radius: 999px;
  background: var(--white); color: var(--ink); text-decoration: none; font-family: var(--font-head); font-weight: 600;
  font-size: 15px; text-transform: uppercase; letter-spacing: .03em; scroll-snap-align: start; line-height: 1.1; padding-top: 10px;
}
.chip:hover { background: var(--beige-light); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip-count { font-family: var(--font-body); font-size: 12px; font-weight: bold; background: var(--beige); color: var(--ink); border-radius: 999px; padding: 2px 7px; margin-top: -2px; }
.chip.is-active .chip-count { background: var(--orange); }

.chip .icon { width: 18px; height: 18px; margin-top: -3px; }
.chip-season { background: var(--orange); }
.chip-season:hover { background: #ffc261; }
.chip-season.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip-season .chip-count { background: var(--white); }
.chip-season.is-active .chip-count { background: var(--orange); }

.season-banner {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 24px; text-decoration: none; color: var(--ink);
  background: linear-gradient(100deg, var(--orange) 0 76px, var(--orange-tint) 76px); border: var(--border); border-radius: var(--radius);
}
.season-banner:hover { box-shadow: var(--shadow); }
.season-banner-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; background: var(--white); border: var(--border); border-radius: 999px; }
.season-banner-icon .icon { width: 28px; height: 28px; color: #2f7a3e; }
.season-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.season-banner-text b { font-family: var(--font-head); font-size: 22px; text-transform: uppercase; letter-spacing: .03em; padding-top: 3px; }
.season-banner-text span { color: #5a4a2e; }
.icon-flip { transform: scaleX(-1); }
.cat-banner.cat-banner-season { background: var(--orange); color: var(--ink); border-bottom-color: var(--navy); display: flex; align-items: center; gap: 12px; }
.cat-banner-season .icon { width: 28px; height: 28px; margin-top: -4px; color: #2f7a3e; }
.season-note { margin: -6px 0 16px; font-weight: bold; color: #5a4a2e; }
.season-tag {
  margin-right: auto; align-self: center; margin-left: 12px; display: inline-flex; align-items: center; gap: 4px;
  background: var(--orange); color: var(--ink); border-radius: 999px; padding: 3px 10px 2px; font-family: var(--font-head);
  font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
}
.season-tag .icon { width: 14px; height: 14px; margin-top: -2px; color: #2f7a3e; }

.search-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--white); border: var(--border); border-radius: var(--radius); padding: 10px 14px 10px 18px; margin-bottom: 18px; }
.search-summary p { margin: 0; }

/* ---------- naslov kategorije (kao zaglavlje stranice kataloga) ---------- */
.cat-section { margin-bottom: 34px; }
.cat-banner {
  margin: 0 0 16px; background: var(--navy); color: var(--white); font-family: var(--font-head); font-weight: 700;
  font-size: clamp(22px, 3vw, 30px); letter-spacing: .03em; text-transform: uppercase; padding: 16px 22px 12px;
  border-bottom: 8px solid var(--orange); border-radius: 12px 12px 4px 4px;
}

/* ---------- kartica artikla (kao kartica u PDF katalogu) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 16px; }
.product {
  --img: 140px;
  position: relative; display: grid; grid-template-columns: var(--img) 1fr; grid-template-rows: auto 1fr;
  border: var(--border); border-radius: var(--radius); overflow: hidden; background: transparent; min-height: 200px;
  scroll-margin-top: 80px;
}
.product:target { box-shadow: 0 0 0 4px var(--orange); }
.product-media {
  grid-column: 1; grid-row: 1 / 3; z-index: 2; align-self: center; margin: 12px 0 12px 12px; padding: 4px;
  width: calc(var(--img) - 12px); aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--white); cursor: zoom-in;
}
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-media:hover { box-shadow: 0 0 0 2px var(--navy-tint); }
.product-top { grid-column: 2; grid-row: 1; display: flex; justify-content: flex-end; align-items: flex-end; min-height: 26px; }
.barcode { background: var(--white); padding: 8px 12px 0; display: flex; flex-direction: column; align-items: center; width: 168px; }
.ean-bars { width: 100%; height: 34px; fill: var(--ink); display: block; }
.barcode-num { font-size: 11.5px; letter-spacing: .14em; line-height: 1.3; padding: 1px 0 2px; }
.product-band {
  grid-column: 1 / 3; grid-row: 2; background: var(--white); border-top-left-radius: 22px; z-index: 1;
  padding: 10px 14px 12px calc(var(--img) + 14px); display: flex; flex-direction: column;
}
.product-code { margin: 2px 0 2px; font-weight: bold; font-size: 15px; letter-spacing: .1em; color: var(--ink); }
.product-code span { letter-spacing: .1em; }
.product-name { margin: 0; font-family: var(--font-body); font-weight: normal; font-size: 15px; letter-spacing: .07em; line-height: 1.35; color: var(--ink); }
.product-desc { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); letter-spacing: .02em; }
.product-actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.add-form { display: flex; gap: 8px; margin: 0; }
.qty { display: inline-flex; align-items: stretch; border: var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); height: 42px; }
.qty input { width: 58px; border: 0; text-align: center; font-weight: bold; font-size: 16px; -moz-appearance: textfield; appearance: textfield; padding: 0 2px; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; background: var(--orange-tint); }
.qty-btn { width: 34px; border: 0; background: var(--beige-light); cursor: pointer; display: grid; place-items: center; }
.qty-btn:hover { background: var(--beige); }
.qty-btn .icon { width: 16px; height: 16px; }
.btn-add { min-height: 42px; padding: 8px 16px; }
.in-cart { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: bold; color: var(--success); text-decoration: none; background: var(--success-tint); padding: 5px 10px; border-radius: 999px; }
.in-cart .icon { width: 15px; height: 15px; }
.product.is-added { animation: added .7s ease-out; }
@keyframes added { 0% { box-shadow: 0 0 0 0 rgba(252,176,64,.9); } 100% { box-shadow: 0 0 0 14px rgba(252,176,64,0); } }

.empty-state { text-align: center; background: var(--white); border: var(--border); border-radius: var(--radius); padding: 40px 20px; max-width: 640px; margin: 20px auto; }
.empty-state .icon-xl { margin: 0 auto 8px; }
.empty-state h2 { font-family: var(--font-head); font-size: 26px; margin: 6px 0; }
.empty-state p { color: var(--muted); margin: 0 auto 18px; max-width: 460px; }

/* pregled artikla */
.preview { border: var(--border); border-radius: 20px; padding: 0; width: min(860px, calc(100% - 24px)); max-height: calc(100% - 24px); background: var(--white); }
.preview::backdrop { background: rgba(28, 30, 50, .55); }
.preview-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); cursor: pointer; display: grid; place-items: center; }
.preview-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.preview-img { background: var(--white); padding: 24px; display: grid; place-items: center; border-right: 2px solid var(--line); }
.preview-img img { max-height: 60vh; object-fit: contain; }
.preview-info { padding: 26px 24px 24px; background: linear-gradient(var(--beige-light), var(--white) 120px); }
.preview-cat { margin: 0 0 12px; display: inline-block; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; background: var(--navy); color: var(--white); padding: 6px 10px 4px; border-radius: 6px; }
.preview-name { font-family: var(--font-body); font-weight: normal; font-size: 20px; letter-spacing: .06em; margin: 6px 0 10px; }
.preview-desc { white-space: pre-line; color: var(--muted); margin: 0 0 10px; }
.preview-ean { font-size: 14px; letter-spacing: .08em; margin: 0 0 18px; }
.preview-actions .add-form { flex-wrap: wrap; }

/* ---------- stranice ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(28px, 4vw, 36px); margin: 0; color: var(--navy-deep); display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.title-count { font-family: var(--font-body); font-size: 15px; background: var(--white); border: var(--border); border-radius: 999px; padding: 3px 10px; color: var(--ink); }
.panel { background: var(--white); border: var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 20px; margin: 0 0 14px; color: var(--navy-deep); padding-top: 3px; }
.panel-title .icon { color: var(--navy); }
.table-panel { padding: 0; overflow-x: auto; }

/* košarica */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.cart-items { padding: 6px 18px; }
.cart-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row form { margin: 0; }
.cart-thumb { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--white); }
.cart-info p { margin: 0; }
.cart-name { letter-spacing: .05em; font-size: 15px; }
.cart-cat { font-size: 12.5px; color: var(--muted); margin-top: 2px !important; }
.cart-summary { position: sticky; top: 16px; }
.cart-summary h2 { font-family: var(--font-head); font-size: 22px; margin: 0 0 12px; color: var(--navy-deep); padding-top: 3px; }
.summary-list { margin: 0 0 16px; }
.summary-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: bold; text-align: right; }
.order-form .btn-lg { margin-bottom: 8px; }

/* narudžbe */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card, .admin-order { background: var(--white); border: var(--border); border-radius: var(--radius); overflow: hidden; }
.order-card > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 18px; cursor: pointer; list-style: none; }
.order-card > summary::-webkit-details-marker { display: none; }
.order-card > summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin-left: auto; transition: transform .15s; }
.order-card[open] > summary::after { transform: rotate(225deg); }
.order-card[open] > summary { border-bottom: 1px solid var(--line); background: var(--beige-light); }
.order-no { font-size: 16px; }
.order-date { color: var(--muted); }
.order-meta { color: var(--muted); font-size: 14px; }
.order-body { padding: 8px 18px 16px; }
.order-note { background: var(--orange-tint); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }

.status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: bold; white-space: nowrap; }
.status-new { background: var(--orange); color: var(--ink); }
.status-done { background: var(--success-tint); color: var(--success); }
.status-muted { background: #ece8e1; color: var(--muted); }
.status-admin { background: var(--navy-tint); color: var(--navy-deep); }
.status-season { background: var(--orange-tint); color: #7a4a00; }
.icon-btn-season.is-on { background: var(--orange); border-color: var(--ink); color: #1f5e2e; }
.icon-inline { width: 16px; height: 16px; vertical-align: -3px; color: #2f7a3e; }
.check-season .icon { width: 18px; height: 18px; vertical-align: -4px; color: #2f7a3e; margin-right: 2px; }
.panel-season { background: linear-gradient(var(--orange-tint), var(--white) 90px); }
.panel-season .panel-title .icon { color: #2f7a3e; }
.season-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 0 14px; align-items: end; margin-top: 10px; }
.season-form .btn { margin-bottom: 14px; }
.season-actions { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }

/* povijest narudžbi kupca */
.history-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.history-stats div { background: var(--white); border: var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.history-stats span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.history-stats b { font-family: var(--font-head); font-size: 26px; color: var(--navy-deep); padding-top: 3px; }
.thumb-cell { width: 60px; }
.thumb-cell .table-thumb { width: 44px; height: 44px; }
.order-reorder { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.tab { padding: 10px 16px 8px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: 17px; border: 2px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; margin-bottom: -2px; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { background: var(--beige-light); }
.tab.is-active { background: var(--white); border-color: var(--ink); }
.tab-count { font-family: var(--font-body); font-size: 12px; font-weight: bold; background: var(--beige); padding: 2px 8px; border-radius: 999px; margin-top: -2px; }
.tab.is-active .tab-count { background: var(--orange); }

.admin-order.is-done { border-color: #9a958c; }
.order-head { display: grid; grid-template-columns: 170px minmax(0, 1.4fr) 150px 150px auto; gap: 12px 18px; align-items: center; padding: 14px 18px; }
.order-head .label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.order-id { display: flex; flex-direction: column; }
.order-id .order-no { font-size: 18px; }
.order-customer b { display: block; font-size: 16px; }
.order-status { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.order-actions { display: flex; justify-content: flex-end; }
.order-items { border-top: 1px solid var(--line); }
.order-items > summary { padding: 10px 18px; cursor: pointer; font-size: 14px; font-weight: bold; color: var(--navy-dark); }
.order-items[open] > summary { background: var(--beige-light); }
.order-items > .table, .order-items > .order-note { margin-left: 18px; margin-right: 18px; width: calc(100% - 36px); }
.order-secondary { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; }
.order-secondary form { margin: 0; }
.new-order-banner { display: flex; align-items: center; gap: 10px; background: var(--orange); border: var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-weight: bold; }
.new-order-banner .btn { margin-left: auto; }
.inline-search { display: flex; gap: 8px; }
.inline-search input { min-height: 36px; padding: 6px 12px; width: 240px; }

/* tablice */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--beige-light); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.mono { white-space: nowrap; }
.order-body, .order-items { overflow-x: auto; }
.table tr.is-muted td { color: #8c877f; }
.table tr.is-muted .table-thumb { opacity: .5; }
.table-thumb { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--white); }
.empty-cell { text-align: center; color: var(--muted); padding: 28px !important; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
.edit-row > td { background: var(--beige-light); }

/* filteri i forme u administraciji */
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: var(--white); border: var(--border); border-radius: var(--radius); padding: 14px 16px 0; margin-bottom: 18px; }
.filter-bar .field { flex: 0 1 220px; }
.filter-bar .field-grow { flex: 1 1 260px; }
.filter-bar .btn { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 8px 28px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-col-image .field-label { display: block; margin-bottom: 6px; }
.image-drop { aspect-ratio: 1; border: 2px dashed #cfc6b8; border-radius: var(--radius); background: var(--white); display: grid; place-items: center; padding: 12px; margin-bottom: 10px; }
.image-drop img { max-height: 100%; object-fit: contain; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.user-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; align-items: end; }
.user-form .check { grid-column: 1 / -1; margin-top: 0; }
.user-form > .btn { justify-self: start; }
.user-form-edit .form-actions-inline { grid-column: 1 / -1; display: flex; gap: 8px; }
.credentials { display: flex; align-items: center; gap: 18px; justify-content: space-between; background: var(--success-tint); border: 2px solid var(--success); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.credentials h2 { font-family: var(--font-head); font-size: 19px; margin: 0 0 8px; color: var(--success); padding-top: 3px; }
.credentials pre { background: var(--white); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; font-size: 15px; white-space: pre-wrap; }
.credentials p { margin: 0; }
.inline-create { display: flex; gap: 10px; }
.inline-create input { flex: 1; }
.rename-form { display: flex; gap: 8px; align-items: center; max-width: 520px; }
.rename-form input { min-height: 38px; padding: 6px 10px; }

/* ---------- prilagodba za manje ekrane ---------- */
@media (max-width: 1400px) {
  .user-chip { display: none; }
}
@media (max-width: 1100px) {
  .order-head { grid-template-columns: 150px minmax(0, 1fr) 130px; }
  .order-status { grid-column: 1; }
  .order-actions { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .form-col-image { max-width: 360px; }
  .user-form { grid-template-columns: 1fr; }
  .hide-md { display: none; }
  .preview-body { grid-template-columns: 1fr; }
  .preview-img { border-right: 0; border-bottom: 2px solid var(--line); }
  .preview-img img { max-height: 42vh; }
}
@media (max-width: 720px) {
  .header-inner { gap: 10px; }
  .brand { margin-right: 0; }
  .brand-name { font-size: 20px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .user-nav { margin-left: auto; }
  .user-chip { display: none; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .order-head { grid-template-columns: 1fr 1fr; }
  .order-customer { grid-column: 1 / -1; grid-row: 1; }
  .order-actions { grid-column: 1 / -1; justify-content: stretch; }
  .order-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-orders { text-align: left; }
  .inline-search { width: 100%; }
  .inline-search input { flex: 1; width: auto; }
  .field-row { grid-template-columns: 1fr; }
  .history-stats { grid-template-columns: 1fr 1fr; }
  .season-form { grid-template-columns: 1fr; }
  .season-form .btn { justify-self: start; }
  .season-banner { flex-wrap: wrap; background: var(--orange-tint); }
  .season-banner .btn { width: 100%; }
}
@media (max-width: 520px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .product { --img: 104px; min-height: 0; }
  .product-media { margin: 10px 0 10px 8px; }
  .product-band { padding: 10px 12px 12px calc(var(--img) + 8px); }
  .barcode { width: 132px; padding: 6px 8px 0; }
  .ean-bars { height: 26px; }
  .barcode-num { font-size: 10px; letter-spacing: .08em; }
  .product-code { font-size: 14px; letter-spacing: .06em; }
  .product-name { font-size: 14px; letter-spacing: .04em; }
  .add-form { width: 100%; }
  .btn-add { flex: 1; padding: 8px 10px; }
  .qty input { width: 48px; }
  .cart-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .cart-thumb { width: 56px; height: 56px; }
  .cart-qty-form { grid-column: 2; }
  .cover-top { padding: 40px 16px 88px; }
  .cover-bottom { flex-direction: column; align-items: flex-start; }
  .cover-orders { align-items: flex-start; }
  .login-card { padding: 22px 18px 18px; }
  .nav-link { padding: 8px 10px; }
  .cart-link span:not(.badge) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .admin-nav, .cat-bar, .product-actions { display: none !important; }
  body { background: #fff; }
}
