/* Page-specific pieces that are not general components. */

/* product detail: stock forms, prices */
.stock-forms details { margin-top: var(--s-2); }
.stock-forms summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.stock-forms summary:hover { color: var(--accent-hover); }
.stock-summary { display: flex; flex-direction: column; align-items: flex-end; }
.stock-summary .stat-value { margin-top: 0; }
.availability-line { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; color: var(--text-3); font-size: var(--fs-sm); margin: var(--s-2) 0 var(--s-3); }
.price-card .inline-form { margin-top: var(--s-3); }
.price-card > p strong { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }

@media (min-width: 768px) {
  .price-card .inline-form { grid-template-columns: minmax(200px, 320px) auto; justify-content: start; }
  .stock-set .inline-form { grid-template-columns: 110px 110px 1fr auto; }
  .field-small { max-width: 180px; }
}

/* --- home page ------------------------------------------------------------------------------- */
.donut-wrap { display: grid; grid-template-columns: 140px 1fr; gap: var(--s-5); align-items: center; }
.kv { display: grid; gap: var(--s-3); }
.kv div { display: flex; align-items: center; gap: var(--s-2); color: var(--text-2); }
.kv b { margin-left: auto; color: var(--text-1); font-variant-numeric: tabular-nums; }
.stack-row { display: grid; gap: 6px; margin-bottom: var(--s-4); }
.stack-row-top { display: flex; justify-content: space-between; gap: var(--s-3); color: var(--text-2); font-size: var(--fs-sm); }
.list-row { color: var(--text-1); text-decoration: none; }
a.list-row:hover { color: var(--text-1); }
.list-main { min-width: 0; }
.list-main > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-rows + .list-rows { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line-soft); }
.status-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); color: var(--text-3); font-size: var(--fs-sm); }
.status-bar span { display: inline-flex; align-items: center; gap: var(--s-2); padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-1); }
.grid-main > .card { margin-bottom: var(--s-4); }
@media (max-width: 767px) {
  .donut-wrap { grid-template-columns: 110px 1fr; gap: var(--s-4); }
  .donut-wrap .donut { width: 110px; height: 110px; }
  .list-row .end { display: none; }
  /* recent changes: the time moves under the description instead of disappearing */
  [data-section="recent-changes"] .list-row { flex-wrap: wrap; row-gap: 2px; }
  [data-section="recent-changes"] .list-row .end { display: block; flex-basis: 100%; margin-left: 0; text-align: left;
    padding-left: calc(34px + var(--s-3)); }
}

/* --- products: list ---------------------------------------------------------------------------- */
.toolbar-card { display: grid; gap: var(--s-3); padding: var(--s-4); }
.toolbar-card .toolbar { display: grid; gap: var(--s-3); }
.status-switch { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.status-switch a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 12px; }
.status-switch .count { font-size: 11px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-3); }
.status-switch .is-active .count { background: var(--accent-soft); color: var(--accent); }
.table-card { padding: var(--s-2) var(--s-3); }
.product-cell { display: flex; align-items: center; gap: var(--s-3); color: var(--text-1); text-decoration: none; min-width: 0; }
.product-cell:hover { color: var(--text-1); }
.product-cell:hover strong { color: var(--accent); }
.product-cell-text { display: grid; min-width: 0; }
.product-cell-text strong { font-weight: 600; transition: color var(--t-fast) var(--ease); }
.product-cell-text .muted { font-size: var(--fs-sm); }
.product-avatar {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; font-size: var(--fs-sm); color: var(--accent); letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(62, 207, 142, 0.18), rgba(167, 139, 250, 0.12));
  border: 1px solid var(--line);
}
.product-avatar-lg { width: 56px; height: 56px; border-radius: 14px; font-size: var(--fs-xl); }
/* the cell stays a table cell (row lines aligned); the prices stack inside it, one per line */
.price-stack { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: middle; }
.price-chip { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stock-figure { font-weight: 650; font-variant-numeric: tabular-nums; }
.stock-figure.is-low { color: var(--amber); }
.stock-figure.is-out { color: var(--red); }
.row-action { width: 44px; text-align: right; }
.nowrap { white-space: nowrap; }
@media (min-width: 768px) {
  .toolbar-card .toolbar { grid-template-columns: minmax(200px, 1fr) minmax(160px, 220px) auto; align-items: center; }
}
/* status switch and filters side by side only when both fit without clipping */
@media (min-width: 1280px) {
  .toolbar-card { grid-template-columns: auto 1fr; align-items: center; }
}
@media (max-width: 767px) {
  .responsive-table td.row-action { display: none; }
  .responsive-table td .product-cell { justify-content: flex-end; text-align: right; }
  .price-stack { align-items: flex-end; }
  /* status filter: all four options visible, in two rows if needed (no hidden scrolling) */
  .status-switch { display: flex; flex-wrap: wrap; overflow: visible; gap: 2px; }
  .status-switch a { flex: 1 1 auto; justify-content: center; }
}

/* --- products: detail -------------------------------------------------------------------------- */
.product-hero { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.product-hero-text { flex: 1 1 280px; min-width: 0; }
.product-hero h1 { margin-bottom: 6px; }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); color: var(--text-2); font-size: var(--fs-sm); }
/* --sticky-top: height of the sticky top bar (taller on phones: search on its own row) */
:root { --sticky-top: 72px; }
@media (max-width: 767px) { :root { --sticky-top: 109px; } }
.tabs-sticky { position: sticky; top: var(--sticky-top); z-index: 10; backdrop-filter: blur(10px); background: rgba(22, 26, 31, 0.92); }
/* jumping to #zalihe, #cene, #stock-SKU…: the section title stays below the sticky bar and tabs */
.detail-grid [id], .stock-row[id], .price-card[id] { scroll-margin-top: calc(var(--sticky-top) + 60px); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--s-4); align-items: start; }
.detail-side { display: grid; gap: 0; }
@media (min-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .detail-side { position: sticky; top: 132px; }
  .product-form .detail-side { top: 88px; }
}
/* one column (phones, small tablets): prices and stock right after "Osnovno", not at the very end */
@media (max-width: 1099px) {
  .product-detail { display: flex; flex-direction: column; align-items: stretch; }
  .product-detail > .detail-main, .product-detail > .detail-side { display: contents; }
  .product-detail .detail-main > .card { order: 2; }
  .product-detail .detail-main > #osnovno { order: 0; }
  .product-detail .detail-side > .card { order: 1; }
}
.claims-title { display: flex; align-items: center; gap: 6px; margin: var(--s-3) 0 var(--s-2); }
.claim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.claim-list li { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border-left: 3px solid var(--line-strong); }
.claim-list-allowed li { border-left-color: var(--accent); }
.claim-list-forbidden li { border-left-color: var(--red); }
.price-list { display: grid; gap: var(--s-2); }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.price-country { color: var(--text-3); font-size: var(--fs-sm); }
.price-value { font-size: var(--fs-xl); font-weight: 650; font-variant-numeric: tabular-nums; }
.stock-hero { display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-3); }
.stock-hero .stat-value { margin: 0; }
.detail-side .inline-form { grid-template-columns: 1fr; }

/* --- products: form & prices ------------------------------------------------------------------- */
.form-grid-single { grid-template-columns: 1fr; }
.tip-card { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--text-2); font-size: var(--fs-sm); }
.sticky-actions {
  position: sticky; bottom: 0; z-index: 15; margin: 0 calc(var(--s-8) * -1); padding: var(--s-3) var(--s-8);
  background: rgba(11, 13, 16, 0.88); backdrop-filter: blur(10px); border-top: 1px solid var(--line-soft);
}
@media (max-width: 1180px) { .sticky-actions { margin: 0 calc(var(--s-6) * -1); padding: var(--s-3) var(--s-6); } }
@media (max-width: 767px) { .sticky-actions { margin: 0 calc(var(--s-4) * -1); padding: var(--s-3) var(--s-4); } .sticky-actions .button { flex: 1 1 auto; } }
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--s-4); }
@media (min-width: 980px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-current { margin-bottom: var(--s-4); }
.price-current .stat-value { display: inline; font-size: 30px; }

/* --- stock page ---------------------------------------------------------------------------------- */
.stats-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) { .stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stock-list { display: grid; gap: 0; }
.stock-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.stock-row-head .product-cell { flex: 1 1 220px; }
.stock-figure-block { display: flex; align-items: baseline; gap: var(--s-2); margin-left: auto; }
.stock-big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stock-row .bar-row { grid-template-columns: 0 1fr 0; gap: 0; }
.stock-row .bar-row .label, .stock-row .bar-row .value { display: none; }
.availability-item { display: inline-flex; align-items: center; gap: 6px; }
.stock-quick, .stock-exact { display: grid; gap: var(--s-3); align-items: end; margin-top: var(--s-3); }
.stock-set summary { list-style: none; }
.stock-set summary::-webkit-details-marker { display: none; }
.stock-set summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.stock-set[open] summary::before { content: "−"; }
@media (min-width: 768px) {
  .stock-quick { grid-template-columns: 150px 1fr auto; }
  .stock-exact { grid-template-columns: 110px 110px 1fr auto; }
}
.detail-side .stock-quick, .detail-side .stock-exact { grid-template-columns: 1fr; }

/* --- content editor ------------------------------------------------------------------------------ */
.editor-card .code-textarea { min-height: 280px; background: var(--bg-0); }
.editor-card h2 label { font: inherit; color: inherit; }
.help-card p { color: var(--text-2); font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.code-sample { font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.7; padding: var(--s-3);
  border-radius: var(--r-sm); background: var(--bg-0); border: 1px solid var(--line); color: var(--accent); margin-bottom: var(--s-3); overflow-x: auto; }

/* --- TXT import ---------------------------------------------------------------------------------- */
.steps { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: flex; gap: var(--s-2); counter-reset: step; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: var(--s-2); color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; }
.step + .step::before { content: ""; width: 28px; height: 1px; background: var(--line-strong); margin-right: var(--s-1); }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: var(--fs-xs); }
.step.is-current { color: var(--text-1); }
.step.is-current .step-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.is-done { color: var(--text-2); }
.step.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }

.dropzone {
  position: relative; display: grid; justify-items: center; gap: var(--s-2); text-align: center;
  padding: var(--s-8) var(--s-4); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: radial-gradient(400px 160px at 50% 0%, rgba(62, 207, 142, 0.06), transparent 70%), var(--bg-0);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background-color: rgba(62, 207, 142, 0.04); }
.dropzone-title { font-weight: 650; }
.dropzone-hint { color: var(--text-3); font-size: var(--fs-sm); }
.dropzone input[type="file"] { max-width: 100%; }
.dropzone-files { color: var(--accent); font-size: var(--fs-sm); font-family: var(--font-mono); }

.card-error { border-color: rgba(242, 109, 109, 0.35); }
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.issue-list li { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border-left: 3px solid var(--line-strong); }
.issue-list-error li { border-left-color: var(--red); }
.issue-list-warning li { border-left-color: var(--amber); }
.issue-where { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }
.change-old { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(242, 109, 109, 0.5); }
.change-new { color: var(--text-1); font-weight: 600; }
.import-item .product-avatar .icon { width: 16px; height: 16px; }
.confirm-panel { position: sticky; bottom: var(--s-3); z-index: 12; border-color: var(--line-strong); box-shadow: var(--shadow-pop); }
.confirm-panel-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.confirm-panel p { margin: 0; display: flex; align-items: center; gap: var(--s-2); }
/* forms never grow wider than their card (e.g. the file input's minimum width) */
.form { grid-template-columns: minmax(0, 1fr); }
.dropzone { min-width: 0; }
.dropzone input[type="file"] { width: 100%; min-width: 0; }
@media (max-width: 767px) {
  /* steps: numbers only, plus the label of the current step */
  .steps { flex-wrap: nowrap; }
  .step:not(.is-current) .step-label { display: none; }
  .step + .step::before { width: 14px; }
}

/* --- audit log ---------------------------------------------------------------------------------- */
.audit-filters { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.audit-filters .filters-actions { grid-column: 1 / -1; }
@media (min-width: 980px) {
  .audit-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .audit-filters .filters-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (min-width: 1500px) {
  .audit-filters { grid-template-columns: 1.1fr 1.3fr 1fr 1fr 0.9fr 1fr 1fr auto; }
  .audit-filters .filters-actions { grid-column: auto; }
}
.audit-card { padding: var(--s-2) var(--s-4); }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-item { display: flex; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); }
.audit-item:last-child { border-bottom: 0; }
.audit-body { min-width: 0; flex: 1; }
.audit-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.audit-body .meta { color: var(--text-3); font-size: var(--fs-sm); margin-top: 2px; }
.audit-details { margin-top: var(--s-2); }
.audit-details summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); font-weight: 600; }
.audit-details .table { margin-top: var(--s-2); font-size: var(--fs-sm); }

/* --- account ---------------------------------------------------------------------------------------- */
.sidebar-user-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-1); text-decoration: none; border-radius: var(--r-sm); }
.sidebar-user-link:hover { color: var(--text-1); }
.sidebar-user-link:hover .avatar { box-shadow: 0 0 0 2px var(--violet); }
.profile-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.avatar-lg { width: 52px; height: 52px; font-size: var(--fs-xl); }
.details-compact { grid-template-columns: 1fr; }
.details-compact dt { padding-top: var(--s-2); }
/* device name and the "Ovaj uređaj" badge wrap instead of overflowing the card on phones */
.list-main > .device-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s-2); white-space: normal; overflow: visible; }
.revoke-form { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line-soft); }
@media (max-width: 1180px) and (min-width: 768px) { .sidebar-user-link .who { display: none; } }

/* --- profiles (multi-account) ---------------------------------------------------------------------- */
/* elements hidden by JS stay hidden even when a component class sets display (e.g. .button) */
[hidden] { display: none !important; }
/* actions stay on the right also on pages without the product search (outside a profile) */
.topbar-actions { margin-left: auto; }
.country-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.country-chips .chip { padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-sm); white-space: nowrap; }
.country-chips .chip.is-main { background: var(--accent-soft); color: var(--accent); }
.profile-switch { position: relative; display: flex; align-items: center; gap: var(--s-2); flex: 0 1 240px; min-width: 0; }
.profile-switch > .icon { position: absolute; left: 12px; color: var(--accent); pointer-events: none; }
.profile-switch select { padding-left: 36px; min-height: 40px; background: var(--surface-1); font-weight: 600; min-width: 0; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
@media (min-width: 980px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.profile-card { margin-bottom: 0; display: grid; gap: var(--s-3); align-content: start; }
.profile-countries { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
.profile-countries .price-chip { padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-sm); }
.profile-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.profile-stats div { padding: var(--s-2); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.profile-stats dt { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.3; min-height: 2.6em; }
.profile-stats dd { margin: 2px 0 0; font-size: var(--fs-xl); font-weight: 650; font-variant-numeric: tabular-nums; }
.profile-stats dd.is-low { color: var(--amber); }
.profile-stats dd.is-out { color: var(--red); }
.profile-values { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.profile-values li { display: flex; justify-content: space-between; gap: var(--s-3); }
.profile-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.overview-note { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-5); font-size: var(--fs-sm); }
.country-boxes { border: 0; margin: var(--s-3) 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.country-boxes legend { font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s-2); width: 100%; }
.check { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
[data-profile-badge] { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--violet-soft); color: var(--violet); font-size: var(--fs-xs); font-weight: 600; }
@media (max-width: 767px) {
  .profile-switch { order: 2; flex: 1 1 100%; }
  .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Agent Monitor & AI costs (/admin/ai) ------------------------------------------- */
.ai-scope { display: flex; align-items: center; gap: var(--s-2); }
.ai-scope select { min-height: 40px; min-width: 180px; background: var(--surface-1); font-weight: 600; }
.ai-demo-note { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-4); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--violet-soft); color: var(--violet); font-size: var(--fs-sm); font-weight: 600; }
.ai-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-4); font-size: var(--fs-sm); }
.ai-alert { display: flex; align-items: flex-start; gap: var(--s-3); margin-bottom: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-1); }
.ai-alert > .icon { flex: none; margin-top: 2px; }
.ai-alert div { display: grid; gap: 2px; }
.ai-alert span { color: var(--text-2); font-size: var(--fs-sm); }
.ai-alert.level-70 { border-color: var(--amber-soft); }
.ai-alert.level-70 > .icon { color: var(--amber); }
.ai-alert.level-85 { border-color: var(--amber); background: var(--amber-soft); }
.ai-alert.level-85 > .icon { color: var(--amber); }
.ai-alert.level-100 { border-color: var(--red); background: var(--red-soft); }
.ai-alert.level-100 > .icon { color: var(--red); }
.ai-stats .stat-value { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.ai-meter { margin: var(--s-2) 0 var(--s-1); }
.ai-meter .chart { width: 100%; height: 14px; display: block; }
.ai-tick { fill: var(--text-3); }
.ai-tick-pause { fill: var(--amber); }
.ai-meter-legend { display: flex; justify-content: space-between; color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.ai-meter-legend .is-pause { color: var(--amber); }
.ai-outcomes { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ai-outcomes .badge { min-width: 28px; justify-content: center; font-variant-numeric: tabular-nums; }
.ai-table tfoot td { border-top: 1px solid var(--line); background: var(--surface-2); }
.ai-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-3) var(--s-4) var(--s-4); font-size: var(--fs-xs); }
.ai-matrix-agent { white-space: nowrap; }
.ai-matrix td, .ai-matrix th { font-variant-numeric: tabular-nums; }
.ai-reason { display: block; margin-top: 2px; font-size: var(--fs-xs); }
.ai-limits { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
@media (min-width: 1100px) { .ai-limits { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.ai-limits h3 { margin: 0 0 var(--s-3); font-size: var(--fs-md); }
.ai-limit-side { display: grid; gap: var(--s-3); align-content: start; }
.ai-profile-limits { list-style: none; margin: 0 0 var(--s-2); padding: 0; display: grid; gap: var(--s-2); }
.ai-profile-limits li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--surface-2); }
.ai-profile-limits li > span { display: grid; gap: 2px; min-width: 0; }
.ai-profile-limits .muted { font-size: var(--fs-xs); }
.ai-console-note { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; font-size: var(--fs-sm); }
.ai-reserved { fill: var(--violet); opacity: .55; }
.ai-swatch-actual { background: var(--accent); }
.ai-swatch-reserved { background: var(--violet); opacity: .55; }
.ai-money { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin-bottom: var(--s-2); }
@media (min-width: 980px) { .ai-money { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ai-money-card { margin-bottom: 0; display: grid; gap: var(--s-2); align-content: start; }
.ai-big { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; font-size: var(--fs-3xl, 34px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ai-big small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.ai-split { display: grid; gap: 4px; margin: 0; font-size: var(--fs-sm); }
.ai-split div { display: flex; justify-content: space-between; gap: var(--s-3); }
.ai-split dt { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.ai-split dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ai-estimate { border-style: dashed; }
.ai-estimate .ai-big span { color: var(--blue); }
.ai-estimate-how { margin: 0; font-size: var(--fs-sm); }
.ai-explain { display: flex; align-items: flex-start; gap: var(--s-2); margin: var(--s-3) 0 var(--s-5); font-size: var(--fs-sm); line-height: 1.5; }
.ai-explain > .icon { flex: none; margin-top: 3px; }
.ai-days { width: 100%; height: 140px; display: block; padding: 0 var(--s-1); }
.ai-day { fill: var(--accent); opacity: .8; }
.ai-day.is-today { opacity: 1; fill: var(--violet); }
.ai-day.is-over { fill: var(--red); }
.ai-days-limit { fill: var(--amber); }
.ai-days-axis { display: flex; justify-content: space-between; font-size: var(--fs-xs); margin-top: 4px; }
.ai-ok { color: var(--accent); }
.ai-bad { color: var(--red); }
.ai-warn { color: var(--amber); }
.ai-effect { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (min-width: 980px) { .ai-effect { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ai-effect-item { display: grid; gap: 4px; padding: var(--s-3); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.ai-effect-label { color: var(--text-2); font-size: var(--fs-sm); }
.ai-effect-value { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.ai-effect-foot { color: var(--text-3); font-size: var(--fs-xs); }
.ai-effect-item.is-waiting { border: 1px dashed var(--line); background: transparent; }
.ai-effect-item.is-waiting .ai-effect-value { color: var(--text-3); }
.ai-agent-cell { display: grid; gap: 4px; justify-items: start; }
.ai-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
@media (min-width: 1500px) { .ai-pair { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.ai-pair > .card { margin-bottom: 0; }
.ai-pair + .card, .ai-pair { margin-bottom: var(--s-4); }
.ai-limits > * { align-self: start; }
.ai-limit-form { align-content: start; }
.ai-limits-lower { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line-soft); }
.ai-small { font-size: var(--fs-sm); margin: 0; }
.ai-history { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-2); font-size: var(--fs-sm); }
.ai-history li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); }
@media (max-width: 767px) {
  .ai-meter-legend { display: none; }
  /* finger-sized targets on phones */
  .ai-scope .button, .ai-profile-limits .button, .ai-limits .button-sm { min-height: var(--tap); }
  .ai-scope { width: 100%; flex-wrap: wrap; }
  .ai-scope select { flex: 1 1 140px; min-width: 0; }
}

/* --- "Ton i pravila" (step 3.1): promotion fields follow the "Akcije i popusti" checkbox --- */
.promo-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-4); }
.promo-fields:disabled { opacity: 0.5; }
.promo-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-3) 0; font-size: var(--fs-sm); }

/* --- Agent Monitor, "Sadržaj" (step 3.6): AI generation, AI Compliance and ads apart --- */
.ai-split-costs { display: grid; grid-template-columns: 1fr; gap: var(--s-3); margin: 0 0 var(--s-4); }
@media (min-width: 900px) { .ai-split-costs { grid-template-columns: repeat(3, 1fr); } }
.ai-cost-box { display: grid; gap: var(--s-1); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); }
.ai-cost-box strong { font-size: var(--fs-lg); }
.ai-cost-box.is-separate { border-style: dashed; }
/* narrow screens: a long label and its value share the row, the value wraps below */
[data-section="content"] .kv > div, [data-reasons] > div { flex-wrap: wrap; row-gap: var(--s-1); }

/* --- Vizuelna biblioteka (step 3.7, approved design 70) ------------------------------------ */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-3); margin-top: var(--s-3); }
.media-card { display: grid; align-content: start; gap: var(--s-2); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); color: inherit; text-decoration: none; min-width: 0; }
.media-card:hover { border-color: var(--line-strong, var(--accent)); }
.media-card.is-selected { border-color: var(--accent); }
.media-thumb { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-0); }
.media-thumb-video { display: grid; place-content: center; justify-items: center; gap: var(--s-1); color: var(--text-3); font: 600 var(--fs-xs) var(--font); }
.media-meta { display: grid; gap: 2px; font-size: var(--fs-sm); min-width: 0; }
.media-meta strong, .media-title { overflow-wrap: anywhere; }
.media-badges { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.media-preview { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: var(--r-md); background: var(--bg-0); margin-bottom: var(--s-3); }
#materijali .segmented { flex-wrap: wrap; }
#detalj .kv, #detalj .media-preview { margin-bottom: var(--s-4); }
#materijali > .segmented { margin-top: var(--s-2); }
@media (max-width: 767px) { .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Creative v3 on the item page (step 3.7b, approved design 80/81) ----------------------- */
.swatch { vertical-align: -2px; margin-right: 4px; }
.format-chip { display: inline-flex; gap: 6px; align-items: center; }
.format-box { display: inline-block; border: 2px solid var(--accent); border-radius: 3px; width: 16px; height: 20px; }
.format-box.format-1-1 { height: 16px; }
.format-box.format-9-16 { width: 12px; height: 21px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-2); }
.ref-card { display: grid; gap: 4px; align-content: start; min-width: 0; font-size: var(--fs-xs); }
.ref-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-0); }
.ref-card strong { overflow-wrap: anywhere; }
.ref-card .badge { white-space: normal; justify-self: start; }

/* --- Visual Compliance on the item page (step 3.7c, approved design 90) -------------------- */
.visual-summary { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.visual-list { display: grid; gap: var(--s-3); }
.visual-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); }
.visual-row.is-odbijeno { border-color: var(--red); }
.visual-row.is-pregled, .visual-row.is-rucno { border-color: var(--amber); }
.visual-row img, .visual-row .media-thumb-video { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-0); }
.visual-row video.media-thumb-video { object-fit: contain; }
.visual-body { display: grid; gap: var(--s-2); min-width: 0; }
.visual-body .kv > div { flex-wrap: wrap; row-gap: 4px; }
.visual-body strong { overflow-wrap: anywhere; }
.visual-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.ocr { padding: var(--s-2); border-radius: var(--r-sm); background: var(--bg-0); font-size: var(--fs-sm); overflow-wrap: anywhere; white-space: pre-line; }
.confirm-box { display: grid; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--amber); border-radius: var(--r-md); }
@media (max-width: 767px) { .visual-row { grid-template-columns: 1fr; } .visual-row img, .visual-row .media-thumb-video { width: 100%; max-width: 220px; } }

/* --- Graphics designed by Creative (step 3.7d, approved design 94) ------------------------- */
.gfx-wide { display: grid; gap: var(--s-4); margin-bottom: var(--s-4); }
.gfx-head { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; }
.gfx-budget { display: grid; gap: 6px; min-width: 220px; font-size: var(--fs-sm); }
.gfx-progress { width: 100%; height: 8px; accent-color: var(--accent); }
.gfx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-3); }
.gfx-card { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); min-width: 0; }
.gfx-img { width: 100%; object-fit: cover; border-radius: var(--r-sm); display: block; background: var(--bg-0); }
.gfx-img.gfx-4-5 { aspect-ratio: 4 / 5; } .gfx-img.gfx-1-1 { aspect-ratio: 1; } .gfx-img.gfx-9-16 { aspect-ratio: 9 / 16; }
.gfx-thumbs { display: flex; flex-wrap: wrap; gap: 4px; }
.gfx-thumbs img { width: 56px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.gfx-card h3 { margin: 0; font-size: var(--fs-md, 16px); }
.gfx-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.gfx-score { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-sm); }
.gfx-score b { font-size: 20px; }
.gfx-checks { display: flex; flex-wrap: wrap; gap: 4px; }
.gfx-checks .badge { white-space: normal; }
.gfx-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.gfx-actions .button { width: 100%; }
.gfx-state { display: grid; gap: var(--s-2); padding: var(--s-3); border: 1px dashed var(--line); border-radius: var(--r-md); margin-bottom: var(--s-3); }
.gfx-steps { display: grid; gap: 6px; font-size: var(--fs-sm); }
@media (max-width: 1100px) { .gfx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .gfx-grid { grid-template-columns: 1fr; } .gfx-img { max-width: 320px; margin: 0 auto; } }

/* Stopped plan (step 3.8): the reason under the text, the buttons wrap below it */
.alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.alert-detail { display: block; }
.alert-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.full-resume { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.full-resume .check { font-weight: 400; }
.check-hint { display: block; font-size: var(--fs-xs); font-weight: 400; margin-top: calc(var(--s-1) * -1); }
/* Step 3.8: add to an item's graphics limit before a round */
.gfx-extra { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
.gfx-extra label { font-size: var(--fs-sm); font-weight: 600; }
.gfx-extra input[type="text"] { width: 6.5rem; }
.gfx-extra small { flex-basis: 100%; }

/* Phase 4, step 4.3: the Instagram page (approved design docs/design/instagram) */
.ig-head { display: flex; align-items: center; gap: var(--s-3); }
.ig-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; color: #fff; background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.ig-perms { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-3); }
.ig-steps { margin: 0 0 var(--s-4); padding-left: 1.2rem; display: grid; gap: var(--s-1); }
.ig-can { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.ig-can li { display: flex; gap: var(--s-2); align-items: flex-start; }
.ig-switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); }
[data-section="connection"] .form-actions form { display: inline; }

/* Step 4.5: the item's "Instagram objava" card and "Zakaži spremne" (design 120-121) */
.igp-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); font-size: 1.15rem; font-weight: 700; margin-bottom: var(--s-2); }
.igp-files { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-1); font-size: var(--fs-sm); }
.igp-files li { display: flex; gap: var(--s-2); align-items: center; }
.igp-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.igp-sticker { padding: var(--s-3); border: 1px dashed var(--line); border-radius: var(--r-md); margin-bottom: var(--s-3); }
.igp-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.igp-actions form { display: inline; }
#instagram > form { margin-top: var(--s-3); }
.igp-move { margin-top: var(--s-3); }
.igp-move > summary { list-style: none; cursor: pointer; display: inline-flex; }
.igp-move > summary::-webkit-details-marker { display: none; }
.igw-ready { margin-bottom: var(--s-4); }
.igw-ready > summary { list-style: none; cursor: pointer; display: inline-flex; }
.igw-ready > summary::-webkit-details-marker { display: none; }
.igw-ready:not([open]) { background: none; border: 0; box-shadow: none; padding: 0; }
.igw-ready[open] > summary { margin-bottom: var(--s-3); }
@media (max-width: 767px) { .igp-row { grid-template-columns: 1fr; } }

/* Step 4.6: Instagram results (design 130-133) */
.igr-section { margin-top: var(--s-5, 1.5rem); display: grid; gap: var(--s-4); }
.igr-section > .page-header { margin-bottom: 0; }
.igr-state { font-size: var(--fs-sm); color: var(--text-3); margin: 0 0 var(--s-2); text-transform: uppercase; letter-spacing: .06em; }
.igr-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-3) 0; }
.igr-metrics.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.igr-metrics.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.igr-m { padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.igr-m .k { display: block; font-size: var(--fs-xs, .75rem); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.igr-m .v { display: block; font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.igr-m .v.is-none { font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); }
.igr-m .v.is-na { font-size: var(--fs-sm); font-weight: 600; color: var(--warn, #f5b041); }
.igr-m .t { display: block; font-size: var(--fs-xs, .72rem); color: var(--text-3); }
.igr-legend { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 var(--s-3); }
.igr-legend span { display: inline-flex; gap: var(--s-1); align-items: center; }
.igr-legend b.na { color: var(--warn, #f5b041); }
.igr-legend b.none { color: var(--text-3); }
.igr-foot { font-size: var(--fs-sm); color: var(--text-3); margin-top: var(--s-2); }
.igr-trend { width: 100%; height: 120px; display: block; }
.igr-trend .line { fill: none; stroke: var(--green, #2ecc71); stroke-width: 2; vector-effect: non-scaling-stroke; }
.igr-trend .area { fill: var(--green, #2ecc71); opacity: .12; }
.igr-trend .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.igr-trend-axis { display: flex; justify-content: space-between; font-size: var(--fs-xs, .72rem); color: var(--text-3); }
.igr-two { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-4); align-items: start; }
.igr-best { display: flex; gap: var(--s-3); align-items: center; }
[data-section="week-results"] { margin-bottom: var(--s-4); }
@media (max-width: 767px) {
  .igr-two { grid-template-columns: 1fr; }
  .igr-metrics, .igr-metrics.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Step 4.7: Instagram inbox, SLA, activation, workers (designs 140-147) */
.ib-legend { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 var(--s-4); }
.ib-legend span { display: inline-flex; gap: var(--s-1); align-items: center; }
.ib-two { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-4); align-items: start; }
.ib-split { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: var(--s-4); align-items: start; }
.ib-urgent { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ib-list li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--line); }
.ib-list li.is-active { background: rgba(46, 204, 113, .06); border-radius: var(--r-md); }
.ib-list .who { font-weight: 700; }
.ib-list .prev { color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.ib-list .meta { text-align: right; font-size: var(--fs-xs, .75rem); color: var(--text-3); display: grid; gap: 4px; justify-items: end; }
.ib-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.ib-clock.warn { color: var(--warn, #f5b041); }
.ib-clock.bad { color: var(--danger, #e74c3c); }
.ib-clock.ok { color: var(--green, #2ecc71); }
.ib-thread { display: grid; gap: var(--s-3); }
.ib-msg { max-width: 78%; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line); }
.ib-msg.in { justify-self: start; }
.ib-msg.out { justify-self: end; background: rgba(46, 204, 113, .07); }
.ib-msg.ack { justify-self: end; background: rgba(245, 176, 65, .07); border-style: dashed; }
.ib-msg .t { font-size: var(--fs-xs, .75rem); color: var(--text-3); margin-top: 4px; }
.ib-msg .src { font-size: var(--fs-xs, .75rem); font-weight: 700; color: var(--text-2); margin-bottom: 2px; }
.ib-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-3) 0; }
.ib-t { padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); }
.ib-t .k { display: block; font-size: var(--fs-xs, .75rem); color: var(--text-3); }
.ib-t .v { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.ib-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.ib-checks li { display: grid; grid-template-columns: 26px 1fr auto; gap: var(--s-2); align-items: start; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); }
.ib-checks .d { font-size: var(--fs-sm); color: var(--text-3); }
.ib-checks .ib-fix { margin-top: var(--s-2); }
.ib-grid { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.ib-grid th, .ib-grid td { padding: var(--s-2); border-bottom: 1px solid var(--line); text-align: center; }
.ib-grid th:first-child, .ib-grid td:first-child { text-align: left; }
.ib-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ib-bar > i { display: block; height: 100%; background: var(--green, #2ecc71); }
.ib-bar.amber > i { background: var(--warn, #f5b041); }
.ib-spark { width: 100%; height: 90px; display: block; }
.ib-spark .line { fill: none; stroke: var(--green, #2ecc71); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ib-spark .line2 { fill: none; stroke: var(--violet, #9b59b6); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.ib-spark .limit { stroke: var(--danger, #e74c3c); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.ib-axis { display: flex; justify-content: space-between; font-size: var(--fs-xs, .72rem); color: var(--text-3); }
.ib-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.ib-tabs { display: flex; gap: var(--s-2); margin-bottom: var(--s-3); flex-wrap: wrap; }
@media (max-width: 767px) {
  .ib-two, .ib-split { grid-template-columns: 1fr; }
  .ib-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ib-msg { max-width: 92%; }
}
.ib-bar > i.w0 { width: 0%; }
.ib-bar > i.w1 { width: 1%; }
.ib-bar > i.w2 { width: 2%; }
.ib-bar > i.w3 { width: 3%; }
.ib-bar > i.w4 { width: 4%; }
.ib-bar > i.w5 { width: 5%; }
.ib-bar > i.w6 { width: 6%; }
.ib-bar > i.w7 { width: 7%; }
.ib-bar > i.w8 { width: 8%; }
.ib-bar > i.w9 { width: 9%; }
.ib-bar > i.w10 { width: 10%; }
.ib-bar > i.w11 { width: 11%; }
.ib-bar > i.w12 { width: 12%; }
.ib-bar > i.w13 { width: 13%; }
.ib-bar > i.w14 { width: 14%; }
.ib-bar > i.w15 { width: 15%; }
.ib-bar > i.w16 { width: 16%; }
.ib-bar > i.w17 { width: 17%; }
.ib-bar > i.w18 { width: 18%; }
.ib-bar > i.w19 { width: 19%; }
.ib-bar > i.w20 { width: 20%; }
.ib-bar > i.w21 { width: 21%; }
.ib-bar > i.w22 { width: 22%; }
.ib-bar > i.w23 { width: 23%; }
.ib-bar > i.w24 { width: 24%; }
.ib-bar > i.w25 { width: 25%; }
.ib-bar > i.w26 { width: 26%; }
.ib-bar > i.w27 { width: 27%; }
.ib-bar > i.w28 { width: 28%; }
.ib-bar > i.w29 { width: 29%; }
.ib-bar > i.w30 { width: 30%; }
.ib-bar > i.w31 { width: 31%; }
.ib-bar > i.w32 { width: 32%; }
.ib-bar > i.w33 { width: 33%; }
.ib-bar > i.w34 { width: 34%; }
.ib-bar > i.w35 { width: 35%; }
.ib-bar > i.w36 { width: 36%; }
.ib-bar > i.w37 { width: 37%; }
.ib-bar > i.w38 { width: 38%; }
.ib-bar > i.w39 { width: 39%; }
.ib-bar > i.w40 { width: 40%; }
.ib-bar > i.w41 { width: 41%; }
.ib-bar > i.w42 { width: 42%; }
.ib-bar > i.w43 { width: 43%; }
.ib-bar > i.w44 { width: 44%; }
.ib-bar > i.w45 { width: 45%; }
.ib-bar > i.w46 { width: 46%; }
.ib-bar > i.w47 { width: 47%; }
.ib-bar > i.w48 { width: 48%; }
.ib-bar > i.w49 { width: 49%; }
.ib-bar > i.w50 { width: 50%; }
.ib-bar > i.w51 { width: 51%; }
.ib-bar > i.w52 { width: 52%; }
.ib-bar > i.w53 { width: 53%; }
.ib-bar > i.w54 { width: 54%; }
.ib-bar > i.w55 { width: 55%; }
.ib-bar > i.w56 { width: 56%; }
.ib-bar > i.w57 { width: 57%; }
.ib-bar > i.w58 { width: 58%; }
.ib-bar > i.w59 { width: 59%; }
.ib-bar > i.w60 { width: 60%; }
.ib-bar > i.w61 { width: 61%; }
.ib-bar > i.w62 { width: 62%; }
.ib-bar > i.w63 { width: 63%; }
.ib-bar > i.w64 { width: 64%; }
.ib-bar > i.w65 { width: 65%; }
.ib-bar > i.w66 { width: 66%; }
.ib-bar > i.w67 { width: 67%; }
.ib-bar > i.w68 { width: 68%; }
.ib-bar > i.w69 { width: 69%; }
.ib-bar > i.w70 { width: 70%; }
.ib-bar > i.w71 { width: 71%; }
.ib-bar > i.w72 { width: 72%; }
.ib-bar > i.w73 { width: 73%; }
.ib-bar > i.w74 { width: 74%; }
.ib-bar > i.w75 { width: 75%; }
.ib-bar > i.w76 { width: 76%; }
.ib-bar > i.w77 { width: 77%; }
.ib-bar > i.w78 { width: 78%; }
.ib-bar > i.w79 { width: 79%; }
.ib-bar > i.w80 { width: 80%; }
.ib-bar > i.w81 { width: 81%; }
.ib-bar > i.w82 { width: 82%; }
.ib-bar > i.w83 { width: 83%; }
.ib-bar > i.w84 { width: 84%; }
.ib-bar > i.w85 { width: 85%; }
.ib-bar > i.w86 { width: 86%; }
.ib-bar > i.w87 { width: 87%; }
.ib-bar > i.w88 { width: 88%; }
.ib-bar > i.w89 { width: 89%; }
.ib-bar > i.w90 { width: 90%; }
.ib-bar > i.w91 { width: 91%; }
.ib-bar > i.w92 { width: 92%; }
.ib-bar > i.w93 { width: 93%; }
.ib-bar > i.w94 { width: 94%; }
.ib-bar > i.w95 { width: 95%; }
.ib-bar > i.w96 { width: 96%; }
.ib-bar > i.w97 { width: 97%; }
.ib-bar > i.w98 { width: 98%; }
.ib-bar > i.w99 { width: 99%; }
.ib-bar > i.w100 { width: 100%; }
.ib-tabs form { display: inline; }
.ib-actions form { display: inline; }

/* Part C: users, rights, two-step login, staff performance (designs 145, 148, 149) */
.uc-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: var(--s-4); align-items: start; }
.uc-state { font-size: var(--fs-sm); color: var(--text-3); margin: 0 0 var(--s-2); text-transform: uppercase; letter-spacing: .06em; }
.uc-code { display: flex; gap: var(--s-2); }
.uc-code input { width: 100%; text-align: center; font-size: 1.4rem; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.uc-key { font-family: ui-monospace, monospace; font-size: 1.05rem; letter-spacing: .12em; padding: var(--s-3); border: 1px dashed var(--line); border-radius: var(--r-md); text-align: center; word-break: break-all; }
.uc-recovery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1) var(--s-3); font-family: ui-monospace, monospace; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); }
.uc-steps { margin: 0 0 var(--s-3); padding-left: 1.2rem; display: grid; gap: var(--s-1); }
.uc-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.uc-grid { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.uc-grid th, .uc-grid td { padding: var(--s-2); border-bottom: 1px solid var(--line); text-align: center; }
.uc-grid th:first-child, .uc-grid td:first-child { text-align: left; }
.uc-grid td.owner { color: var(--text-3); }
.uc-check { width: 18px; height: 18px; accent-color: var(--green, #2ecc71); }
.uc-two { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-4); align-items: start; }
.uc-login { max-width: 420px; }
@media (max-width: 767px) { .uc-two { grid-template-columns: 1fr; } .uc-recovery { grid-template-columns: 1fr; } }
.uc-actions form { display: inline; }
.uc-codes-print { white-space: pre; }

/* part D: finance (designs 146, 150) */
.fin-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
.fin-month { display: flex; gap: var(--s-2); align-items: center; }
.fin-month select { min-width: 11rem; }
@media (max-width: 900px) {
  .fin-two { grid-template-columns: 1fr; }
}

/* step 4.S: public pages /privatnost and /brisanje-podataka (design 151) */
.lg-card { width: min(760px, 100%); padding: 36px 40px; border-radius: 20px; }
.lg-card h1 { font-size: 26px; margin: 0 0 6px; }
.lg-card h2 { font-size: 17px; margin: 26px 0 8px; }
.lg-card p, .lg-card li { color: var(--text-2); line-height: 1.65; }
.lg-card ul { padding-left: 20px; margin: 6px 0; }
.lg-meta { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.lg-nav { display: flex; gap: 14px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.lg-card .brand-text { display: inline; } /* the dashboard hides it on mid widths */
/* design 152: the seller's page on the main domain */
.lg-lead { font-size: 15px; }
.lg-facts { display: grid; grid-template-columns: 170px 1fr; margin: 6px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lg-facts dt, .lg-facts dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lg-facts dt { color: var(--text-3); }
.lg-facts dd { color: var(--text-1); }
.lg-facts dt:last-of-type, .lg-facts dd:last-of-type { border-bottom: 0; }
.lg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.lg-steps div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--text-2); }
.lg-steps strong { display: block; color: var(--text-1); margin-bottom: 2px; }
@media (max-width: 600px) {
  .lg-card { padding: 24px 20px; }
  .lg-facts { grid-template-columns: 1fr; }
  .lg-facts dt { border-bottom: 0; padding-bottom: 0; }
  .lg-steps { grid-template-columns: 1fr; }
}
