/* ============================================================
   OtpremaHub — style.css
   Theme: Industrial Precision
   ============================================================ */

/* ============================================================
   Design tokeni — „Pro" ink tema (default: dark), lime akcenat.
   Centralno mesto; komponente NE hardkoduju vrednosti.
   ============================================================ */
:root {
  /* Površine (ink) */
  --bg: #0C0F13;            /* glavni sadržaj */
  --bg-surface: #0A0D11;    /* sidebar */
  --bg-card: #12161D;       /* kartice / header / footer */
  --bg-elevated: #1A212A;   /* chip / track / hover-solid */
  --bg-hover: rgba(255, 255, 255, 0.03);
  --input-bg: #151B22;      /* pozadina polja */
  --border: #222A33;
  --border-strong: #313B47;
  --border-muted: #1A212A;

  /* Akcenat — lime (varijanta 2a) */
  --accent: #B7E94A;
  --accent-text: #131900;   /* tekst na akcentu */
  --accent-10: rgba(183, 233, 74, 0.10);  /* soft bg */
  --accent-20: rgba(183, 233, 74, 0.20);  /* ivice */
  --accent-22: rgba(183, 233, 74, 0.22);  /* focus ring / senke */
  --accent-25: rgba(183, 233, 74, 0.25);  /* ivice */
  --accent-35: rgba(183, 233, 74, 0.35);  /* jake ivice */
  /* Legacy aliasi (postojeći kod koristi --amber*) */
  --amber: var(--accent);
  --amber-dim: var(--accent-10);
  --amber-border: var(--accent-25);

  /* Tekst */
  --text: #F2F5F7;
  --text-muted: #93A0AC;
  --text-faint: #5F6A76;

  /* Statusne boje (Pro paleta) */
  --green: #B7E94A;
  --green-dim: rgba(183, 233, 74, 0.12);
  --red: #FF8A75;
  --red-dim: rgba(255, 138, 117, 0.10);
  --blue: #54D8FF;
  --blue-dim: rgba(84, 216, 255, 0.12);
  --purple: #B9A1FF;
  --purple-dim: rgba(185, 161, 255, 0.12);
  --teal: #54D8FF;
  --teal-dim: rgba(84, 216, 255, 0.12);
  --orange: #F2B842;
  --orange-dim: rgba(242, 184, 66, 0.12);
  --gray-dim: rgba(95, 106, 118, 0.14);

  /* Oblici */
  --sidebar-w: 250px;
  --radius: 12px;           /* polja i dugmad */
  --radius-sm: 9px;         /* bedž / mali elementi */
  --radius-card: 18px;      /* kartice */
  --radius-table: 10px;     /* polja u tabeli stavki */
  --radius-pill: 999px;

  /* Visine */
  --field-h: 50px;
  --btn-h: 50px;
  --table-h: 44px;

  /* Fokus prsten */
  --focus-ring: 0 0 0 4px var(--accent-22);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 60px rgba(0, 0, 0, 0.45);
}

/* ── „Signal" konstante (nezavisne od teme) ───────────────────
   Fontovi, tamni okvir, brend i statusne boje dolaznih/odlaznih (izvor: redizajn README
   „Statusi" i kod/web/status.ts). Koraci 2+ ih koriste; Korak 1 samo definiše. */
:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ink: #0A1430;
  --ink-2: #111D3F;
  --ink-panel: #0D1A3D;
  --on-ink: #C9D2E6;
  --on-ink-muted: #8FA0C9;
  --primary: #3355FF;
  --primary-hover: #2441E0;
  --primary-50: #EEF2FF;
  --primary-100: #DDE4FF;
  --primary-300: #9DB0FF;
  --primary-300b: #7C93FF;
  --brand-teal: #12B5A5;
  --brand-teal-300: #3EE0CF;
  --brand-gradient: linear-gradient(135deg, #3355FF, #12B5A5);
  --danger-border: #F5C2BD;
  --shadow-primary: 0 6px 16px -6px rgba(51, 85, 255, 0.7);
  --shadow-pop: 0 24px 50px -12px rgba(10, 20, 48, 0.3);
  --halo: 0 0 0 4px rgba(51, 85, 255, 0.1);

  /* Statusi: fg / bg / tačka */
  --st-najava-fg: #475569;   --st-najava-bg: #EEF1F6;   --st-najava-dot: #94A3B8;
  --st-put-fg: #2441E0;      --st-put-bg: #EAEFFF;      --st-put-dot: #3355FF;
  --st-stiglo-fg: #A45A00;   --st-stiglo-bg: #FFF3DC;   --st-stiglo-dot: #F59E0B;
  --st-ok-fg: #0F7A4A;       --st-ok-bg: #E3F6EC;       --st-ok-dot: #16A34A;
  --st-razlika-fg: #B4400F;  --st-razlika-bg: #FDEBDF;  --st-razlika-dot: #F97316;
  --st-odbijeno-fg: #B42318; --st-odbijeno-bg: #FDE7E6; --st-odbijeno-dot: #EF4444;
  --st-nacrt-fg: #6B3FD4;    --st-nacrt-bg: #F1EBFF;    --st-nacrt-dot: #8B5CF6;
}

@keyframes ohRise  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ohFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ohPop   { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ohPulse { 0% { box-shadow: 0 0 0 0 rgba(18,181,165,.55); } 70% { box-shadow: 0 0 0 9px rgba(18,181,165,0); } 100% { box-shadow: 0 0 0 0 rgba(18,181,165,0); } }
@keyframes ohSpin  { to { transform: rotate(360deg); } }
@keyframes ohLaser { 0%, 100% { top: 10%; } 50% { top: 86%; } }

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

/* ── Animacije (Pro README „Animations") ─────────────────── */
@keyframes om-spin    { to { transform: rotate(360deg); } }
@keyframes om-pulse   { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.72); } }
@keyframes om-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes om-pop     { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes om-rise    { 0% { transform: translateY(8px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* ============================================================
   1. Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea {
  font-family: inherit;
}

/* ============================================================
   2. Layout
   ============================================================ */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
}

/* ============================================================
   3. Sidebar
   ============================================================ */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border-muted);
}

.logo-icon {
  font-size: 22px;
  color: var(--amber);
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Meni je narastao (Izbor firme, Distributeri, Obračuni…) i na nižim ekranima
     prelazi visinu. Roditelj ima overflow:hidden, pa bez ovoga stavke budu odsečene
     bez ikakve mogućnosti skrolovanja. min-height:0 je obavezan — flex stavka se
     inače ne skuplja ispod visine sadržaja. */
  overflow-y: auto;
  min-height: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: 11px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
  /* Većina stavki su <a> (radi „otvori u novom tabu"), ali „Izbor firme" otvara modal
     pa je ostalo <button>. Bez ovog poništavanja dugme nosi podrazumevanu pozadinu i
     ivicu pregledača, pa je štrčalo među ostalima. */
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-10);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  border-top: 1px solid var(--border-muted);
  padding: 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-10);
  border: 1px solid var(--accent-35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

.user-details {
  min-width: 0;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-faint);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.btn-logout svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   4. Login page
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
  background-image: radial-gradient(ellipse at 50% 40%, rgba(240, 165, 0, 0.05) 0%, transparent 60%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  font-size: 24px;
  color: var(--amber);
}

.login-logo .logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
}

.login-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.error-msg {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ============================================================
   5. Page header
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title-group {
}

.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  box-shadow: 0 4px 18px var(--accent-22);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-success {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.btn-success:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-danger {
  background: var(--red);
  color: #2A0E08;
  font-weight: 700;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 11px 18px;
}

.btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ============================================================
   7. Forms
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.input {
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  height: var(--field-h);
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 16px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* textarea koristi istu .input klasu — visina auto */
textarea.input {
  height: auto;
  min-height: 82px;
  padding: 12px 16px;
  line-height: 1.5;
}

/* select sa custom chevronom (radi bez wrappera) */
select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%237A828E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
/* select u tabeli stavki (uži padding za chevron) */
.of-item-grid select.input {
  padding-right: 28px;
  background-position: right 10px center;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.input::placeholder {
  color: var(--text-faint);
}

.input[readonly] {
  opacity: 0.6;
  cursor: default;
}

.input-sm {
  height: auto;
  padding: 8px 11px;
  font-size: 14px;
  border-radius: var(--radius-table);
}

.textarea {
  resize: vertical;
  min-height: 82px;
}

/* ============================================================
   8. Status badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.badge-pulse::before {
  animation: om-pulse 1.6s ease-in-out infinite;
}

.badge-lg {
  font-size: 13px;
  padding: 5px 14px;
}

.badge-blue {
  background: var(--blue-dim);
  color: var(--blue);
}

.badge-purple {
  background: var(--purple-dim);
  color: var(--purple);
}

.badge-amber {
  background: var(--amber-dim);
  color: var(--amber);
}

.badge-green {
  background: var(--green-dim);
  color: var(--green);
}

.badge-teal {
  background: var(--teal-dim);
  color: var(--teal);
}

.badge-red {
  background: var(--red-dim);
  color: var(--red);
}

.badge-gray {
  background: var(--gray-dim);
  color: var(--text-muted);
}

.badge-dark-red {
  background: var(--red-dim);
  color: var(--red);
}

/* ============================================================
   9. Tables
   ============================================================ */
.table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  background: var(--bg-elevated);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-muted);
  transition: background 0.1s;
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table td {
  padding: 13px 16px;
  font-size: 14px;
  vertical-align: middle;
}

.table-row {
  cursor: pointer;
}

.table-row:hover {
  background: var(--bg-hover);
}

.text-right {
  text-align: right !important;
}

.row-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}

/* ============================================================
   10. Data table (admin views)
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  background: var(--bg-elevated);
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-muted);
  transition: background 0.12s;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table td {
  padding: 14px 20px;
  font-size: 14px;
  vertical-align: middle;
}

.link-btn {
  color: var(--amber);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.link-btn:hover {
  border-bottom-color: var(--amber);
}

.detail-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-muted);
  gap: 12px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 2px;
}

.detail-val {
  font-size: 0.9rem;
}

.col-filter-input {
  margin-top: 6px;
  width: 100%;
  padding: 4px 8px;
  font-size: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.col-filter-input:focus {
  border-color: var(--amber);
}

/* Oznaka sortiranja uz naziv kolone — prigušena dok kolona nije aktivna, da se vidi
   da je sortabilna, a da ne odvlači pažnju od aktivnog sortiranja. */
.sort-ind {
  margin-left: 6px;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
}

.sort-ind.active {
  color: var(--accent);
  opacity: 1;
  font-weight: 600;
}

/* Sortira se klikom na NAZIV kolone, ne na celu ćeliju — u ćeliji stoji i polje za pretragu,
   pa je klik u njega ranije usput sortirao i tabela bi se ponovo iscrtala pod prstima.
   Dugme mora da poništi podrazumevani izgled (pozadina, okvir, font, boja), inače iskoči
   sivo sistemsko dugme usred zaglavlja. */
.th-sort {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: inherit;
  cursor: pointer;
}

.th-sort:hover .sort-ind {
  opacity: 1;
}

.th-sort:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.col-filter-input option {
  background: var(--bg-surface);
}

/* ============================================================
   11. Doc / Sender info
   ============================================================ */
.doc-number {
  font-weight: 500;
  font-size: 14px;
}

.doc-cip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sender-name {
  font-size: 14px;
}

.sender-pib {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.date {
  font-size: 13px;
}

/* ============================================================
   11. Detail page
   ============================================================ */
.detail-page {
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.closed-badge {
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-row dt {
  font-size: 12px;
  color: var(--text-faint);
}

.info-row dd {
  font-size: 14px;
  color: var(--text);
}

.stavke-section {
}

.section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ============================================================
   12. Filter bar
   ============================================================ */
.filter-bar {
  margin-bottom: 16px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

/* Tab koji menja TIP dokumenta, ne status — isprekidana ivica ga odvaja
   od filtera po statusu u istom redu. */
.filter-tab-doc {
  border-style: dashed;
}

.filter-tab-doc::before {
  content: "🧾";
  margin-right: 6px;
  font-size: 12px;
}

/* Značka „novo" na tabu — broj dokumenata koje je druga strana promenila,
   a niko ih još nije otvorio. */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--red, #e5484d);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.filter-tab.active .tab-badge {
  background: var(--accent-text, #fff);
  color: var(--accent, #111);
}

/* Tab „Sve" na Dolaznim ima kolonu Tip više od ostalih prikaza. */
.list-head.list-head-ulazni,
.list-row.list-row-ulazni {
  grid-template-columns: 210px 110px 1fr 120px 170px 30px;
}

.chip-tip {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Traka „radiš kao {firma}" — mora biti neprevidljiva, jer korisnik menja tuđe podatke. */
.kontekst-traka {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -8px 0 20px;
  padding: 10px 16px;
  border: 1px dashed var(--accent, #b8e123);
  border-radius: var(--radius-md, 10px);
  background: var(--accent-dim, rgba(184, 225, 35, 0.08));
  font-size: 14px;
}

.kontekst-oznaka {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kontekst-pib {
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}

.kontekst-traka .btn {
  margin-left: auto;
}

/* Spisak zaposlenih. Slaganje dve klase je obavezno — `.list-row` postavlja svoj
   grid kasnije u fajlu i inače pregazi ovaj. */
.list-head.list-head-zap,
.list-row.list-row-zap {
  grid-template-columns:
    minmax(150px, 1.4fr)   /* ime i prezime */
    minmax(170px, 1.6fr)   /* e-mail */
    130px                  /* rola */
    130px                  /* poslednja prijava */
    110px                  /* status */
    120px;                 /* akcija */
}

/* Spisak distributera. Fiksne širine su zbirno prelazile širinu kartice i spisak je
   ispadao van ekrana — zato minmax, koji se skuplja umesto da gura sadržaj napolje. */
.list-head.list-head-dist,
.list-row.list-row-dist {
  grid-template-columns:
    minmax(150px, 1.6fr)   /* naziv */
    110px                  /* PIB */
    minmax(170px, 1.8fr)   /* administrator */
    110px                  /* status */
    120px                  /* akcija */
    24px;                  /* strelica */
  cursor: pointer;
}

/* ── Mesečni obračun licenci ── */
.obracun-izdavalac {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  margin-bottom: 20px;
  overflow: hidden;
}

.obracun-izdavalac-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--input-bg);
}

.obracun-izdavalac-head h3 {
  margin: 0;
  font-size: 16px;
}

.obracun-total {
  font-size: 22px;
  font-weight: 700;
}

.obracun-total-l {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.obracun-firma {
  display: grid;
  grid-template-columns: 1fr 160px 30px;
  gap: 16px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.obracun-firma:hover,
.obracun-firma.is-open {
  background: var(--input-bg);
}

.obracun-brojevi {
  text-align: right;
  color: var(--text-muted);
  font-size: 14px;
}

.obracun-brojevi strong {
  font-size: 18px;
  color: var(--text);
}

.obracun-licence {
  padding: 4px 20px 14px;
  background: var(--input-bg);
}

.obracun-licenca {
  display: grid;
  grid-template-columns: 160px 190px 100px 1fr;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  font-size: 13.5px;
  border-top: 1px dashed var(--border);
}

.obracun-licenca.nije-naplativo {
  opacity: 0.62;
}

.obracun-razlog {
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .obracun-licenca {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Broj uz naziv taba (koliko ima firmi tog tipa) — neutralno, za razliku od crvenog „novo". */
.tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.filter-tab.active .tab-count {
  background: var(--accent-text, #fff);
  color: var(--accent, #111);
}

/* Spisak firmi u modalu za izbor konteksta. */
.list-row.firma-row {
  grid-template-columns: minmax(160px, 1.6fr) 120px minmax(150px, 1.4fr) 110px 24px;
  cursor: pointer;
}

.firma-neaktivna {
  opacity: 0.55;
}

/* Nepogledan dokument — tačka uz broj i naglašena leva ivica reda. */
.novo-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--red, #e5484d);
  vertical-align: middle;
}

.list-row.is-novo {
  box-shadow: inset 3px 0 0 var(--red, #e5484d);
}

/* ============================================================
   Pro lista (kartica sa grid tabelom)
   ============================================================ */
.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.list-scroll {
  overflow-x: auto;
}
.list-head,
.list-row {
  display: grid;
  grid-template-columns: 230px 1fr 130px 180px 30px;
  gap: 16px;
  align-items: center;
}
.list-head {
  padding: 14px 24px;
  background: var(--input-bg);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.list-row {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  animation: om-rise 0.3s ease both;
}
.list-row:last-child {
  border-bottom: none;
}
.list-row:hover {
  background: rgba(255, 255, 255, 0.025);
}
[data-theme="light"] .list-row:hover {
  background: rgba(0, 0, 0, 0.025);
}

/* ── Šifarnici voznog parka ──
   Klase se slažu sa `.list-row` i stoje POSLE nje — inače bi je `.list-row` iznad
   pregazio pri istoj specifičnosti i spisak bi dobio pogrešan broj kolona. */
.list-head.list-head-voz,
.list-row.list-row-voz {
  grid-template-columns:
    minmax(130px, 0.9fr)   /* tablice */
    minmax(140px, 1.2fr)   /* marka i model */
    minmax(140px, 1.4fr)   /* napomena */
    120px                  /* status */
    170px;                 /* akcije */
  cursor: default;
}

.list-head.list-head-vzc,
.list-row.list-row-vzc {
  grid-template-columns:
    minmax(150px, 1.3fr)   /* ime i prezime */
    minmax(110px, 0.8fr)   /* vozačka */
    minmax(110px, 0.8fr)   /* lična karta */
    minmax(110px, 0.8fr)   /* telefon */
    110px                  /* status */
    180px;                 /* akcije */
  cursor: default;
}

/* Povučeno vozilo / neaktivan vozač ostaje vidljiv, ali prigušen — podaci na starim
   otpremnicama su snimljeni, pa se red ne briše. */
.list-row.je-neaktivan {
  opacity: 0.55;
}

.list-akcije {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ── Istorija promena statusa dokumenta ── */
.ist-lista {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.ist-zaglavlje,
.ist-red {
  display: grid;
  grid-template-columns:
    18px                   /* tačka na vremenskoj osi */
    150px                  /* kada */
    minmax(200px, 1fr)     /* promena */
    minmax(140px, 0.9fr)   /* ko */
    minmax(160px, 1.3fr);  /* napomena */
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
}

.ist-zaglavlje {
  background: var(--input-bg);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.ist-red {
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.ist-red:last-child {
  border-bottom: none;
}

.ist-tacka {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #b8e123);
}

.ist-vreme {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ist-prelaz {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ist-stari {
  color: var(--text-muted);
  text-decoration: line-through;
}

.ist-strelica {
  color: var(--text-faint);
}

.ist-email {
  font-size: 12px;
  color: var(--text-muted);
}

.ist-napomena {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ── Birač iz šifarnika (vozilo / vozač) u transport sekciji ── */
.sif-wrap {
  display: block;
}

/* Lista se crta U TOKU, ne apsolutno. `.modal-body` ima `overflow-y: auto`, a apsolutno
   pozicioniran element ne povećava `scrollHeight` — lista otvorena kod dna forme bila bi
   odsečena, bez ičega do čega bi se doskrolovalo. Ovako gura polja ispod sebe i modal se
   normalno skroluje. */
.sif-dd {
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.sif-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.sif-item:last-child {
  border-bottom: none;
}

.sif-item:hover {
  background: var(--input-bg);
}

.sif-item-naslov {
  font-size: 14px;
  font-weight: 600;
}

.sif-item-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.sif-prazno {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}
.list-doc {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
}
.list-uuid {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.list-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.list-date {
  font-size: 14.5px;
  color: var(--text-muted);
}
.list-chevron {
  color: var(--text-faint);
  font-size: 18px;
  text-align: center;
}
.list-foot {
  padding: 14px 4px 4px;
  font-size: 13px;
  color: var(--text-faint);
}
@media (max-width: 768px) {
  .list-head,
  .list-row {
    min-width: 640px;
  }
}

/* ============================================================
   13. Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 4px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
}

.record-count {
  padding: 14px 0 4px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   14. Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

/* `.modal-box` je alias koji se koristi na 10 mesta u app.js, a nikad nije bio definisan —
   ti modali su ostajali bez visine i bez skrola, pa bi kod duže forme footer sa dugmadima
   ispao ispod ekrana i podaci se nisu mogli sačuvati. */
.modal,
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.18s ease;
  /* Da sadržaj koji skroluje ne izlazi preko zaobljenih ivica. */
  overflow: hidden;
}

.modal-lg {
  max-width: 820px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  /* Bez min-height:0 se flex stavka ne skuplja ispod visine sadržaja, pa overflow-y
     nikad ne proradi: modal preraste max-height, a footer sa dugmadima ispadne
     ispod ekrana. Vidi se na najdužoj formi (nova firma / novi distributer). */
  min-height: 0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ============================================================
   15. Radio group (prijem modal)
   ============================================================ */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.radio-option input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-option:hover {
  background: var(--bg-elevated);
}

.radio-option.active {
  border-color: var(--amber-border);
  background: var(--amber-dim);
}

.radio-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.radio-option.active .radio-icon {
  background: var(--amber);
  color: #000;
}

.radio-option strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.radio-option small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   16. Prijem table
   ============================================================ */
.stavke-prijem-table {
  margin-bottom: 20px;
}

/* ============================================================
   17. Loading & Empty states
   ============================================================ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  gap: 8px;
  color: var(--text-muted);
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.35;
  margin-bottom: 4px;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}

.empty-state p {
  font-size: 14px;
}

/* ============================================================
   18. Toasts
   ============================================================ */
#toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(100% + 32px));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 3px solid;
  background: var(--bg-card);
  color: var(--text);
  pointer-events: auto;
}

.toast.show {
  transform: none;
}

.toast-success {
  border-color: var(--green);
}

.toast-error {
  border-color: var(--red);
}

.toast-warning {
  border-color: var(--amber);
}

.toast-info {
  border-color: var(--blue);
}

/* ============================================================
   19. Utility
   ============================================================ */
.mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.text-muted {
  color: var(--text-muted);
}

.text-success {
  color: var(--green);
}

.text-danger {
  color: var(--red);
}

/* ============================================================
   20. Scrollbar
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* ============================================================
   21. Light Theme (A1 paleta: crvena / bela / siva)
   ============================================================ */
/* „Signal" (redizajn 13.11.2026, docs/design_handoff_otpremahub_signal/README.md „Design tokens").
   Svetla poslovna tema — PODRAZUMEVANA. Postojeća imena tokena dobijaju Signal vrednosti, pa
   svi ekrani prelaze automatski. Sidebar ostaje svetao do Koraka 2 (tamni okvir #0A1430). */
[data-theme="light"] {
  --bg: #F3F5FA;              /* canvas */
  --bg-surface: #FFFFFF;      /* sidebar — u Koraku 2 postaje --ink */
  --bg-card: #FFFFFF;         /* surface */
  --bg-elevated: #EEF1F6;     /* chip / track / hover-solid */
  --bg-hover: #F5F7FF;        /* hover / izabran red */
  --input-bg: #FFFFFF;
  --border: #E4E8F1;
  --border-strong: #D5DBE8;
  --border-muted: #EEF1F6;

  --accent: #3355FF;          /* primary */
  --accent-text: #FFFFFF;
  --accent-10: rgba(51, 85, 255, 0.10);
  --accent-20: rgba(51, 85, 255, 0.20);
  --accent-22: rgba(51, 85, 255, 0.12);   /* fokus halo inputa */
  --accent-25: rgba(51, 85, 255, 0.25);
  --accent-35: rgba(51, 85, 255, 0.35);

  --text: #0E1726;
  --text-muted: #4A5568;      /* text-2 */
  --text-faint: #7A8599;      /* text-3 */

  /* Statusne boje → Signal fg/bg parovi */
  --green: #0F7A4A;
  --green-dim: #E3F6EC;
  --red: #B42318;
  --red-dim: #FDE7E6;
  --blue: #2441E0;
  --blue-dim: #EAEFFF;
  --purple: #6B3FD4;
  --purple-dim: #F1EBFF;
  --teal: #0F8A7E;
  --teal-dim: rgba(18, 181, 165, 0.12);
  --orange: #A45A00;
  --orange-dim: #FFF3DC;
  --gray-dim: #EEF1F6;

  /* Oblici i visine (README „Radijusi, visine, senke") */
  --radius: 11px;
  --radius-sm: 8px;
  --radius-card: 16px;
  --field-h: 44px;
  --btn-h: 42px;

  --focus-ring: 0 0 0 4px rgba(51, 85, 255, 0.12);
  /* Kartice nemaju senku — samo ivicu; senka ostaje za popover/modal */
  --shadow: 0 1px 2px rgba(10, 20, 48, 0.05);
  --shadow-lg: 0 24px 50px -12px rgba(10, 20, 48, 0.3);
}

/* Login gradient u light modu */
[data-theme="light"] .login-page {
  background-image: radial-gradient(ellipse at 50% 40%, var(--accent-10) 0%, transparent 60%);
}

/* Modal (Signal „Globalno"): backdrop + blur, dijalog r20, senka pop */
[data-theme="light"] .modal-overlay {
  background: rgba(10, 20, 48, 0.45);
  backdrop-filter: blur(3px);
}
[data-theme="light"] .modal,
[data-theme="light"] .modal-box {
  border-radius: 20px;
  box-shadow: var(--shadow-pop);
}

/* Dugmad (Signal: visina 42, radijus 11; primary senka; secondary = belo + ivica) */
[data-theme="light"] .btn {
  min-height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
}
[data-theme="light"] .btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
}
[data-theme="light"] .btn-full { min-height: 46px; }
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-success {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-primary);
}
[data-theme="light"] .btn-primary:hover:not(:disabled),
[data-theme="light"] .btn-success:hover:not(:disabled) {
  background: var(--primary-hover);
  filter: none;
}
[data-theme="light"] .btn-ghost {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
}
[data-theme="light"] .btn-danger {
  background: #FFFFFF;
  color: var(--red);
  border: 1px solid var(--danger-border);
}
[data-theme="light"] .btn-danger:hover:not(:disabled) {
  background: var(--red-dim);
}

/* Bedž = pill 13px/700 */
[data-theme="light"] .badge {
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
}

/* Fokus (Signal): tastatura → outline 2px primary; polja → plava ivica + halo */
[data-theme="light"] :focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
[data-theme="light"] .input:focus,
[data-theme="light"] .textarea:focus,
[data-theme="light"] select.input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  outline: none;
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #D5DBE8;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #B4BCCB;
}

/* Badge koji u tamnoj temi ima hardcode boje */
[data-theme="light"] .badge-dark-red {
  background: var(--red-dim);
  color: var(--red);
}

/* Toggle dugme — tema ikonica */
.btn-theme {
  background: none;
  border: none;
  color: var(--text-faint);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  transition: all 0.15s;
  cursor: pointer;
}

.btn-theme:hover {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.btn-theme svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   21b. „Pro" zajedničke komponente
   ============================================================ */

/* ── Sekcija sa numerisanom značkom (01–04) ─────────────── */
.of-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.of-section:first-child {
  padding-top: 6px;
}
.of-section:last-child {
  border-bottom: none;
}
.of-section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
/* numerisana značka */
.sec-badge {
  flex-shrink: 0;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-10);
  border: 1px solid var(--accent-25);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  line-height: 1;
}
/* stara akcentna traka (fallback, još u upotrebi ponegde) */
.of-section-mark {
  flex-shrink: 0;
  align-self: stretch;
  width: 4px;
  min-height: 34px;
  border-radius: 4px;
  background: var(--accent);
}
.of-section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.of-section-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 3px;
}
.of-subhead {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* 2-kolonski grid polja */
.of-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.of-grid2 .field {
  margin-bottom: 0;
}

/* ── Uslovna napomena ───────────────────────────────────── */
.of-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 13px;
  background: var(--accent-10);
  border: 1px solid var(--accent-20);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  animation: om-rise 0.35s ease both;
}
.of-note-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  animation: om-pulse 2s ease-in-out infinite;
}

/* ── Tabela stavki ──────────────────────────────────────── */
.of-items-head,
.of-item-grid {
  display: grid;
  grid-template-columns: 26px 118px 1fr 82px 96px 38px;
  gap: 10px;
  align-items: center;
}
.of-items-head {
  padding: 0 0 10px;
}
.of-items-head > div {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.of-items-head .of-ih-num {
  text-align: center;
}
.of-item-grid {
  padding: 8px 6px;
  margin: 0 -6px;
  border-radius: 10px;
  transition: background 0.15s;
}
.of-item-grid:hover {
  background: rgba(255, 255, 255, 0.02);
}
.of-item-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-faint);
  font-weight: 600;
  text-align: center;
}
.of-item-grid .input {
  height: var(--table-h);
  padding: 0 12px;
  font-size: 15px;
  border-radius: var(--radius-table);
}
.of-remove-btn {
  width: 38px;
  height: var(--table-h);
  border-radius: var(--radius-table);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s;
}
.of-remove-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}
.of-add-row {
  margin-top: 14px;
  width: 100%;
  height: 50px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}
.of-add-row:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-10);
}

/* Footer rezime */
.of-foot-summary {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: auto;
}

/* ── Merač popunjenosti (progress) ──────────────────────── */
.progress {
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-label {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.progress-track {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-pct {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* ── Chip / pill (sync chip, filteri) ───────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

/* sync chip stanja */
.sync-chip {
  cursor: default;
  font-size: 13.5px;
}
.sync-chip.is-done {
  border-color: var(--accent-35);
  background: var(--accent-10);
  color: var(--accent);
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: om-pulse 2s ease-in-out infinite;
}
.sync-link {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.sync-check {
  animation: om-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Spinner ────────────────────────────────────────────── */
.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-22);
  border-top-color: var(--accent);
  animation: om-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spinner-btn {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid rgba(19, 25, 0, 0.25);
  border-top-color: var(--accent-text);
  animation: om-spin 0.7s linear infinite;
  vertical-align: -3px;
}

/* ── Skeleton (shimmer) ─────────────────────────────────── */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #232C37 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: om-shimmer 1.2s ease-in-out infinite;
}
[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #F4F6EF 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
}

/* ── Baner uspeha ───────────────────────────────────────── */
.success-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--accent-10);
  border: 1px solid var(--accent-25);
  animation: om-rise 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  animation: om-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}
.success-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Otpremnica modal (Pro kartica) ─────────────────────── */
.of-modal {
  border-radius: 22px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 160px);
  overflow: hidden;
}
.of-header {
  align-items: flex-start;
  padding: 24px 30px 16px;
}
.of-kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.of-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.of-progress-row {
  padding: 0 30px 18px;
  border-bottom: 1px solid var(--border);
}
.of-form {
  padding-left: 30px;
  padding-right: 30px;
}

/* ============================================================
   22. Responsive (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  .of-grid2 {
    grid-template-columns: 1fr;
  }
  .of-items-wrap {
    overflow-x: auto;
  }
  .of-items-head,
  .of-item-grid {
    min-width: 460px;
  }

  .sidebar {
    width: 58px;
  }

  .logo-name,
  .nav-item span,
  .user-role,
  .user-details {
    display: none;
  }

  .sidebar-logo {
    justify-content: center;
    padding: 16px 8px;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .sidebar-footer {
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
  }

  .main {
    padding: 16px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal,
  .modal-box,
  .modal-lg {
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 92vh;
  }

  .page-header {
    flex-direction: column;
  }
}

/* `.card` i `.kupac-result-item` se koriste u app.js a nikad nisu bili definisani —
   renderovali su se bez pozadine i ivice. */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.kupac-result-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.kupac-result-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

/* Neplanirani pretovar — jedna faza vožnje u formi (app.js renderPretovarModal) */
.faza-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 12px;
  margin-bottom: 12px;
}

.faza-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Agent D: papirna otpremnica / offline (Zakon čl. 5) — kartica u detalju odlazne otpremnice */
.offline-opis {
  margin: 6px 0 0;
  font-size: 13px;
}

.offline-akcije {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.offline-rok {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.offline-rok-ok {
  background: var(--green-dim);
}

.offline-rok-upoz {
  background: var(--orange-dim);
  color: var(--orange);
}

.offline-rok-istekao {
  background: var(--red-dim);
  color: var(--red);
}

/* ============================================================
   Signal — Korak 2: okvir (sidebar + gornja traka)
   docs/design_handoff_otpremahub_signal/README.md „Shell"
   Sidebar je tamnoplav u obe teme (deo brenda, ne teme).
   ============================================================ */
.sg-sidebar {
  width: 256px;
  background: var(--ink);
  border-right: none;
  padding: 14px;
  gap: 16px;
  color: var(--on-ink);
  overflow-y: auto;
}

.sg-logo { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; }
.sg-logo-znak {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-gradient);
  display: grid; place-items: center;
  color: #FFFFFF; font-size: 20px;
}
.sg-logo-naziv { font-size: 18px; font-weight: 800; color: #FFFFFF; letter-spacing: -0.02em; }

/* Kartica firme/objekta — zamenjuje traku „Radiš kao" */
.sg-firma {
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}
.sg-firma-podrska { border-color: rgba(245, 158, 11, 0.45); }
.sg-firma-dugme {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px; background: none; border: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; border-radius: 12px;
}
.sg-firma-dugme:disabled { cursor: default; }
.sg-firma-dugme:not(:disabled):hover { background: rgba(255, 255, 255, 0.04); }
.sg-firma-ikona {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgba(18, 181, 165, 0.16); color: var(--brand-teal-300);
  display: grid; place-items: center; font-size: 20px;
}
.sg-firma-tekst { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sg-firma-naziv { font-size: 14px; font-weight: 700; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-firma-pod { font-size: 12.5px; color: var(--on-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-firma-strelica { color: var(--on-ink-muted); font-size: 16px; }
.sg-firma-podrska-red {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 10px; gap: 8px;
}
.sg-oznaka-podrska {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #1A1200; background: #F59E0B;
  padding: 2px 8px; border-radius: 999px;
}
.sg-izadji {
  background: none; border: 1px solid rgba(255, 255, 255, 0.18); color: #FFFFFF;
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.sg-izadji:hover { background: rgba(255, 255, 255, 0.08); }

/* Meni */
.sg-nav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.sg-grupa { display: flex; flex-direction: column; gap: 2px; }
.sg-grupa-naslov {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #5D6A8A; padding: 0 12px 6px;
}
.sg-nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: #B4BED6;
  transition: background .15s, color .15s;
}
.sg-nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; }
.sg-nav-item.active {
  background: linear-gradient(90deg, rgba(51, 85, 255, .32), rgba(51, 85, 255, .06));
  box-shadow: inset 2px 0 0 var(--primary-300b);
  color: #FFFFFF; font-weight: 600;
}
.sg-nav-ikona { font-size: 19px; flex-shrink: 0; }
.sg-nav-item.active .sg-nav-ikona { color: var(--primary-300); }
.sg-nav-naziv { flex: 1; }
.sg-bedz {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #F59E0B; color: #1A1200; font-size: 12px; font-weight: 800;
  display: inline-grid; place-items: center;
}
.sg-bedz-tih {
  padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08);
  color: var(--on-ink); font-size: 12px; font-weight: 700;
}

/* CIP indikator */
.sg-cip {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: 12px; cursor: pointer;
  background: rgba(18, 181, 165, 0.08); border: 1px solid rgba(18, 181, 165, 0.25);
}
.sg-cip-tacka {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
  background: var(--brand-teal-300); animation: ohPulse 2s infinite;
}
.sg-cip-tekst { display: flex; flex-direction: column; min-width: 0; }
.sg-cip-naslov { font-size: 13.5px; font-weight: 700; color: var(--brand-teal-300); }
.sg-cip-pod { font-size: 12.5px; color: var(--on-ink-muted); line-height: 1.35; }
.sg-cip-provera { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
.sg-cip-provera .sg-cip-tacka { background: var(--on-ink-muted); animation: om-pulse 1s infinite; }
.sg-cip-provera .sg-cip-naslov { color: var(--on-ink); }
.sg-cip-greska { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.35); }
.sg-cip-greska .sg-cip-tacka { background: #EF4444; animation: none; }
.sg-cip-greska .sg-cip-naslov { color: #FCA5A5; }

/* Korisnik */
.sg-korisnik {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px 0; border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.sg-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #7C93FF, #3EE0CF);
  color: #0A1430; font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
.sg-korisnik-tekst { flex: 1; min-width: 0; }
.sg-korisnik-ime { font-size: 14px; font-weight: 700; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-korisnik-uloga { font-size: 12.5px; color: var(--on-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-sidebar .sg-ikona-dugme { color: var(--on-ink-muted); width: 30px; height: 30px; font-size: 18px; }
.sg-korisnik { gap: 8px; }
.sg-sidebar .sg-ikona-dugme:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }

/* Zajedničko dugme-ikona */
.sg-ikona-dugme {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: none; border: none; font: inherit; cursor: pointer;
  display: grid; place-items: center; font-size: 19px; color: var(--text-muted);
  position: relative;
}
.sg-ikona-dugme:hover { background: var(--bg-hover); color: var(--text); }

/* Desna kolona: gornja traka + sadržaj */
.sg-sadrzaj { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.sg-sadrzaj > .main { flex: 1; padding: 24px 28px; }

.sg-topbar {
  height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.sg-pretraga {
  flex: 1; max-width: 460px; height: 42px;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--bg); border: 1px solid transparent; border-radius: 11px;
  color: var(--text-faint);
}
.sg-pretraga:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); background: var(--bg-card); }
.sg-pretraga i { font-size: 18px; }
.sg-pretraga input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font: inherit; font-size: 14.5px; color: var(--text);
}
.sg-pretraga input::placeholder { color: var(--text-faint); }
.sg-topbar-desno { display: flex; align-items: center; gap: 12px; }
.sg-nova i { font-size: 17px; }
.sg-zvono-omot { position: relative; }
.sg-zvono-tacka {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: #F59E0B; box-shadow: 0 0 0 2px var(--bg-card);
}
.sg-popover {
  position: absolute; right: 0; top: 46px; z-index: 50; width: 380px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-pop); padding: 8px; animation: ohRise .25s ease both;
}
.sg-popover-naslov { font-size: 15px; font-weight: 700; padding: 8px 10px 10px; color: var(--text); }
.sg-popover-red {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px;
  font-size: 14px; color: var(--text);
}
.sg-popover-red:hover { background: var(--bg-hover); }
.sg-popover-red i { font-size: 18px; color: var(--primary); }
.sg-popover-prazno { display: flex; align-items: center; gap: 8px; padding: 12px 10px; color: var(--text-muted); font-size: 14px; }
.sg-popover-prazno i { color: var(--st-ok-dot); font-size: 18px; }

/* ============================================================
   Signal — Korak 3: komponente statusa
   Boje stižu iz status.js kroz CSS promenljive (--pill-*, --korak-*, --mono-*).
   ============================================================ */
.sg-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; white-space: nowrap;
  color: var(--pill-fg); background: var(--pill-bg);
  font-weight: 700;
}
.sg-pill i { font-size: 1.05em; }
.sg-pill-sm { font-size: 13px; padding: 4px 11px 4px 9px; }
.sg-pill-md { font-size: 14px; padding: 6px 14px 6px 11px; }

.sg-status-blok { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sg-cip-pravno { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: .02em; }

/* Napredak u 4 faze (tabela) */
.sg-koraci { display: flex; flex-direction: column; gap: 6px; }
.sg-koraci-red { display: flex; align-items: center; }
.sg-korak {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px;
  background: #FFFFFF; border: 1.5px solid var(--border-strong); color: #B4BCCB;
}
.sg-korak.gotovo { background: var(--korak-boja); border-color: var(--korak-boja); color: #FFFFFF; }
.sg-korak-linija { width: 18px; height: 2px; background: var(--border-strong); flex-shrink: 0; }
.sg-korak-linija.gotovo { background: var(--korak-boja); }
.sg-koraci-natpis { font-size: 12.5px; font-weight: 600; color: var(--korak-tekst, var(--text-muted)); }
.sg-koraci-bez .sg-koraci-natpis { color: var(--text-faint); }

/* Vertikalni tok (detalj) */
.sg-tok { list-style: none; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
.sg-tok-faza { position: relative; display: flex; align-items: flex-start; gap: 12px; padding-bottom: 18px; }
.sg-tok-faza:last-child { padding-bottom: 0; }
.sg-tok-faza:not(:last-child)::before {
  content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border-strong);
}
.sg-tok-faza.gotovo:not(:last-child)::before { background: var(--korak-boja); }
.sg-tok-krug {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 16px;
  background: #FFFFFF; border: 1.5px solid var(--border-strong); color: #B4BCCB;
}
.sg-tok-faza.gotovo .sg-tok-krug { background: var(--korak-boja); border-color: var(--korak-boja); color: #FFFFFF; }
.sg-tok-faza.sledeci .sg-tok-krug { border: 2px solid var(--primary); color: var(--primary); box-shadow: var(--halo); }
.sg-tok-tekst { display: flex; flex-direction: column; padding-top: 5px; }
.sg-tok-naziv { font-size: 14.5px; font-weight: 600; color: var(--text); }
.sg-tok-faza:not(.gotovo):not(.sledeci) .sg-tok-naziv { color: var(--text-faint); font-weight: 500; }
.sg-tok-sledeci { font-size: 12.5px; font-weight: 600; color: var(--primary); }

/* Monogram partnera */
.sg-monogram {
  width: var(--mono-size); height: var(--mono-size); border-radius: 11px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: var(--mono-bg); color: var(--mono-fg);
  font-size: calc(var(--mono-size) * 0.34); font-weight: 800; letter-spacing: .01em;
}

/* ============================================================
   Signal — Korak 4: Dolazne (fioke, tabela, detalj desno)
   ============================================================ */
.sg-page-header { align-items: flex-start; }
.sg-page-header .page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.sg-header-akcije { display: flex; gap: 10px; flex-wrap: wrap; }
.sg-header-akcije .btn i { font-size: 17px; }
.sg-vrti { animation: ohSpin .7s linear infinite; display: inline-block; }

/* Fioke */
.sg-fioke { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.sg-fioka {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px 18px; border-radius: 16px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); font: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.sg-fioka:hover { border-color: var(--border-strong); }
.sg-fioka.active { border: 2px solid var(--primary); box-shadow: var(--halo); padding: 15px 17px; }
.sg-fioka-ikona {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 22px;
  background: var(--st-najava-bg); color: var(--st-najava-fg);
}
.sg-fioka-prijem .sg-fioka-ikona { background: var(--st-stiglo-bg); color: var(--st-stiglo-fg); }
.sg-fioka-naputu .sg-fioka-ikona { background: var(--st-put-bg); color: var(--st-put-fg); }
.sg-fioka-zavrsene .sg-fioka-ikona { background: var(--st-ok-bg); color: var(--st-ok-fg); }
.sg-fioka-tekst { display: flex; flex-direction: column; min-width: 0; }
.sg-fioka-naziv { font-size: 14.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-fioka-broj { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }

/* Tabela + panel */
.sg-dolazne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.sg-dolazne.sa-panelom { grid-template-columns: minmax(0, 1fr) 390px; }
.sg-tabela { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.sg-tabela-red {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px 82px 112px 170px;
  align-items: center; gap: 14px; padding: 12px 20px; min-height: 66px;
  border-bottom: 1px solid var(--border);
}
.sg-tabela-red:last-child { border-bottom: none; }
/* Sa otvorenim panelom ostaju dobavljač, napredak i status — naziv dobavljača se ne žrtvuje. */
.sg-dolazne.sa-panelom .sg-tabela-red { grid-template-columns: minmax(0, 1fr) 170px 150px; }
.sg-dolazne.sa-panelom .sg-tabela-red > :nth-child(3),
.sg-dolazne.sa-panelom .sg-tabela-red > :nth-child(4) { display: none; }
.sg-tabela-glava {
  min-height: 0; padding-top: 12px; padding-bottom: 12px; background: #FAFBFD;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint);
}
.sg-glava-napredak { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .02em; padding-right: 8px; }
.sg-dolazne.sa-panelom .sg-glava-napredak { font-size: 9px; gap: 4px; letter-spacing: 0; }
.sg-red { cursor: pointer; transition: background .12s; animation: ohRise .25s ease both; }
.sg-red:hover { background: var(--bg-hover); }
.sg-red.izabran { background: #F5F7FF; box-shadow: inset 3px 0 0 var(--primary); }
.sg-dobavljac { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sg-dobavljac-tekst { min-width: 0; }
.sg-dobavljac-naziv { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-dobavljac-broj { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-celija-tekst { font-size: 14.5px; color: var(--text-muted); }
.sg-status-celija { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }

.sg-prazno { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.sg-prazno i { font-size: 40px; color: var(--st-ok-dot); }
.sg-prazno h3 { margin: 10px 0 4px; font-size: 17px; font-weight: 700; color: var(--text); }
.sg-prazno p { font-size: 14px; }

.sg-skel {
  height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FF 50%, #EEF1F6 75%);
  background-size: 200% 100%; animation: om-shimmer 1.4s ease-in-out infinite;
}
.sg-skel-dug { height: 22px; }
.sg-skel-kratak { width: 60%; }

/* Panel detalja */
.sg-panel {
  position: sticky; top: 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 16px;
  animation: ohRise .25s ease both;
}
.sg-panel-glava { display: flex; align-items: center; gap: 12px; }
.sg-panel-naslov { flex: 1; min-width: 0; }
.sg-panel-naziv { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-panel-pod { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-panel-status { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sg-panel-sekcija { display: flex; flex-direction: column; gap: 10px; }
.sg-panel-labela { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.sg-tok-vreme { font-size: 12.5px; color: var(--text-faint); }
.sg-ploce { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sg-ploca { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sg-ploca span { font-size: 12.5px; color: var(--text-faint); }
.sg-ploca strong { font-size: 14.5px; }
.sg-sadrzaj-lista { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.sg-sadrzaj-lista li {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--border); font-size: 14.5px;
}
.sg-sadrzaj-lista li:last-child { border-bottom: none; }
.sg-panel-dno { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }
.sg-cta { flex: 1; justify-content: center; min-height: 52px; font-size: 15.5px; }
.sg-cta i { font-size: 19px; }
.sg-akcija-napomena { width: 100%; font-size: 13.5px; color: var(--text-muted); }
.sg-pun-detalj { width: 100%; justify-content: center; }

/* Signal TODO(backend) 13.11.2026: aktivna pretraga, „Prikaži još", stanje potvrde prijema */
.sg-pretraga-red { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sg-pretraga-cip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 6px 6px 6px 14px; border-radius: var(--radius-pill);
  background: var(--st-put-bg); color: var(--st-put-fg); font-size: 14px; font-weight: 600;
}
.sg-pretraga-cip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-pretraga-cip button {
  display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0;
  border: none; border-radius: var(--radius-pill); cursor: pointer; font: inherit;
  background: transparent; color: inherit;
}
.sg-pretraga-cip button:hover { background: var(--bg-card); }
.sg-pretraga-broj { font-size: 13.5px; color: var(--text-muted); }
.sg-vise { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 4px; }
.sg-vise-info { font-size: 13px; color: var(--text-faint); }
.sg-panel-obrada {
  font-size: 13.5px; color: var(--st-put-fg); background: var(--st-put-bg);
  border-radius: 12px; padding: 10px 12px;
}
.sg-panel-greska {
  font-size: 13.5px; color: var(--st-odbijeno-fg); background: var(--st-odbijeno-bg);
  border: 1px solid var(--danger-border); border-radius: 12px; padding: 10px 12px;
}

@media (max-width: 1280px) {
  .sg-dolazne.sa-panelom { grid-template-columns: minmax(0, 1fr) 340px; }
  .sg-fioke { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   Signal — Korak 5: Prijem robe (fokus režim)
   ============================================================ */
.sg-prijem { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.sg-prijem-glava {
  height: 76px; flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.sg-prijem-naslov { flex: 1; min-width: 0; }
.sg-prijem-naziv { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-prijem-pod { font-size: 12.5px; color: var(--text-faint); }
.sg-stepper { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sg-step { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--text-faint); }
.sg-step-krug {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--border-strong); font-size: 13px; font-weight: 700; background: #FFFFFF;
}
.sg-step.tekuci { color: var(--text); }
.sg-step.tekuci .sg-step-krug { background: var(--primary); border-color: var(--primary); color: #FFFFFF; box-shadow: var(--halo); }
.sg-step.gotovo { color: var(--st-ok-fg); }
.sg-step.gotovo .sg-step-krug { background: var(--st-ok-dot); border-color: var(--st-ok-dot); color: #FFFFFF; }
.sg-step-linija { width: 32px; height: 2px; background: var(--border-strong); }

.sg-prijem-telo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.sg-prijem-levo { overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }

.sg-nacin { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sg-nacin-labela { font-size: 14.5px; font-weight: 600; color: var(--text-muted); }
.sg-segment { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-elevated); }
.sg-segment button {
  border: none; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text-muted);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.sg-segment button.active { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px rgba(10, 20, 48, .12); }
.sg-nacin-hint { font-size: 13.5px; color: var(--text-faint); }

.sg-skener {
  display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 14px;
  border: 2px solid var(--primary); box-shadow: var(--halo); border-radius: 14px; background: var(--bg-card);
}
.sg-skener-ikona { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 22px; }
.sg-skener input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; font-size: 16px; color: var(--text); }
.sg-skener-cip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--st-ok-bg); color: var(--st-ok-fg); font-size: 13.5px; font-weight: 700; animation: ohPop .35s ease both; white-space: nowrap;
}

.sg-prijem-glava-kolona, .sg-prijem-red {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 200px 150px; align-items: center; gap: 14px;
}
.sg-prijem-glava-kolona { padding: 0 18px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.sg-prijem-glava-kolona span:nth-child(2), .sg-prijem-glava-kolona span:nth-child(3) { text-align: center; }
.sg-prijem-glava-kolona span:last-child { text-align: right; }
.sg-prijem-redovi { display: flex; flex-direction: column; gap: 10px; }
.sg-prijem-red {
  padding: 12px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.sg-prijem-red.razlika { border-color: #F8C9A8; box-shadow: 0 0 0 4px rgba(249, 115, 22, .08); }
.sg-prijem-art-naziv { font-size: 15.5px; font-weight: 700; }
.sg-prijem-art-sifra { font-size: 12.5px; color: var(--text-faint); }
.sg-prijem-ocek { text-align: center; font-size: 16px; color: var(--text-muted); }
.sg-brojac { display: flex; align-items: center; justify-content: center; gap: 6px; }
.sg-brojac-dugme {
  width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border-strong); background: #FFFFFF;
  display: grid; place-items: center; font-size: 18px; color: var(--text); cursor: pointer;
}
.sg-brojac-dugme:hover { background: var(--bg-hover); }
.sg-brojac-polje {
  width: 68px; height: 42px; border-radius: 11px; border: 1px solid var(--border); background: var(--bg);
  text-align: center; font: inherit; font-size: 18px; font-weight: 800; color: var(--text);
}
.sg-brojac-polje:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.sg-prijem-rez { text-align: right; }

/* Pregled */
.sg-pregled-naslov { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.sg-pregled-pod { font-size: 14.5px; color: var(--text-muted); margin-top: -8px; }
.sg-pregled-lista { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; }
.sg-pregled-red {
  display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px 190px 130px; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--text-muted);
}
.sg-pregled-red:last-child { border-bottom: none; }
.sg-pregled-red strong { color: var(--text); }
.sg-vraca-se { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-faint); }
.sg-vraca-se input {
  width: 64px; height: 34px; border-radius: 9px; border: 1px solid var(--border-strong);
  text-align: center; font: inherit; font-size: 14px; color: var(--text); background: #FFFFFF;
}
.sg-vraca-se input:disabled { background: var(--bg-elevated); }
.sg-napomena { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--text-faint); }
.sg-napomena strong { color: var(--text); }
.sg-napomena textarea {
  width: 100%; min-height: 110px; resize: vertical; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-card); font: inherit; font-size: 15px; color: var(--text);
}
.sg-napomena textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }

/* Desni tamni panel */
.sg-prijem-desno {
  display: flex; flex-direction: column; gap: 18px; padding: 28px; overflow-y: auto; color: var(--on-ink);
  background:
    radial-gradient(500px 260px at 100% -10%, rgba(18, 181, 165, .35), transparent 60%),
    radial-gradient(520px 300px at 0% 110%, rgba(51, 85, 255, .45), transparent 60%),
    var(--ink);
}
.sg-rezime-labela { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary-300); }
.sg-rezime-vrh { display: flex; align-items: center; gap: 20px; }
.sg-prsten {
  width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--brand-teal-300) 0 var(--proc), rgba(255, 255, 255, .1) var(--proc) 100%);
}
.sg-prsten-unutra {
  width: 96px; height: 96px; border-radius: 50%; background: var(--ink-panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.sg-prsten-unutra strong { font-size: 28px; font-weight: 800; color: #FFFFFF; letter-spacing: -0.03em; }
.sg-prsten-unutra span { font-size: 12px; color: var(--on-ink-muted); }
.sg-rezime-naslov { font-size: 22px; font-weight: 700; color: #FFFFFF; }
.sg-rezime-pod { font-size: 14px; color: var(--on-ink-muted); }
.sg-razlike { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-razlike li {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-size: 14px;
}
.sg-razlike strong { color: #FDBA74; }
.sg-sve-ok {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: #FFFFFF; font-size: 14.5px;
}
.sg-sve-ok i { color: var(--brand-teal-300); font-size: 20px; }
.sg-rezime-dno { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sg-prijem-desno .sg-belo-dugme { background: #FFFFFF; color: var(--ink); min-height: 56px; justify-content: center; font-size: 16px; font-weight: 700; border: none; }
.sg-prijem-desno .sg-belo-dugme:hover:not(:disabled) { background: #EEF2FF; }
.sg-prijem-desno .sg-tamno-dugme {
  background: transparent; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .22);
  min-height: 46px; justify-content: center; font-weight: 600;
}
.sg-prijem-desno .sg-tamno-dugme:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.sg-prijem-desno .sg-odbij-dugme {
  background: transparent; color: #FDBA74; border: 1px solid rgba(253, 186, 116, .35);
  min-height: 46px; justify-content: center; font-weight: 600;
}
.sg-prijem-desno .sg-odbij-dugme:hover { background: rgba(253, 186, 116, .08); }
.sg-prijem-desno .sg-posalji { min-height: 56px; justify-content: center; font-size: 16px; }
.sg-info-tamno {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
}
.sg-info-tamno i { font-size: 18px; color: var(--primary-300); }
.sg-info-tamno strong { color: #FFFFFF; }

/* Uspeh */
.sg-uspeh { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.sg-uspeh-krug {
  width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 48px;
  background: rgba(62, 224, 207, .14); color: var(--brand-teal-300); border: 2px solid var(--brand-teal-300);
  animation: ohPop .5s cubic-bezier(.34, 1.56, .64, 1) both;
}
.sg-uspeh h2 { font-size: 26px; color: #FFFFFF; }
.sg-uspeh p { color: var(--on-ink-muted); font-size: 15px; margin-bottom: 8px; }
.sg-uspeh .btn { width: 100%; }

/* Odbijanje */
.sg-odbij-modal { max-width: 500px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.sg-odbij-ikona { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--red-dim); color: var(--red); font-size: 28px; }
.sg-odbij-modal .modal-footer { padding: 0; border: none; display: flex; justify-content: flex-end; gap: 10px; }
.sg-danger-pun { background: var(--red); color: #FFFFFF; border: none; }
.sg-danger-pun:disabled { opacity: .45; }
.sg-prijem-prazno { padding: 60px; text-align: center; color: var(--text-muted); }

/* ============================================================
   Signal — Korak 6: Nova odlazna kao čarobnjak
   ============================================================ */
.sg-car-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); animation: ohFade .2s ease both; }
.sg-car { height: 100%; display: grid; grid-template-columns: 290px minmax(0, 1fr) 380px; }

.sg-car-levo { background: var(--bg-card); border-right: 1px solid var(--border); padding: 24px 22px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.sg-car-odustani { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: none; border: none; font: inherit; font-size: 15px; color: var(--text-muted); cursor: pointer; padding: 4px 0; }
.sg-car-odustani:hover { color: var(--text); }
.sg-car-glavni { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.sg-car-koraci { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sg-car-korak-stavka { position: relative; display: flex; gap: 14px; padding: 8px 0 18px; cursor: pointer; }
.sg-car-korak-stavka:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 40px; bottom: 0; width: 2px; background: var(--border); }
.sg-car-korak-stavka.zakljucan { cursor: default; opacity: .7; }
.sg-car-korak-krug {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  border: 1.5px solid var(--border-strong); background: #FFFFFF; color: var(--text-faint); font-weight: 700; font-size: 14px;
}
.sg-car-korak-stavka.tekuci .sg-car-korak-krug { background: var(--primary); border-color: var(--primary); color: #FFFFFF; box-shadow: var(--halo); }
.sg-car-korak-stavka.gotovo .sg-car-korak-krug { background: var(--st-ok-dot); border-color: var(--st-ok-dot); color: #FFFFFF; font-size: 0; }
.sg-car-korak-stavka.gotovo .sg-car-korak-krug::after { content: '✓'; font-size: 15px; }
.sg-car-korak-tekst { display: flex; flex-direction: column; padding-top: 4px; min-width: 0; }
.sg-car-korak-naziv { font-size: 15.5px; font-weight: 700; color: var(--text-faint); }
.sg-car-korak-stavka.tekuci .sg-car-korak-naziv { color: var(--primary); }
.sg-car-korak-stavka.gotovo .sg-car-korak-naziv { color: var(--text); }
.sg-car-korak-pod { font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-car-popunjenost { margin-top: auto; }

.sg-car-sredina { display: flex; flex-direction: column; min-height: 0; }
.sg-car-forma { flex: 1; overflow-y: auto; padding: 28px 36px; }
.sg-car-korak { display: none; animation: ohRise .25s ease both; }
.sg-car[data-korak="1"] .sg-car-korak[data-k="1"],
.sg-car[data-korak="2"] .sg-car-korak[data-k="2"],
.sg-car[data-korak="3"] .sg-car-korak[data-k="3"],
.sg-car[data-korak="4"] .sg-car-korak[data-k="4"] { display: block; }
.sg-car-kicker { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.sg-car-naslov { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; margin: 4px 0; }
.sg-car-opis { font-size: 15px; color: var(--text-muted); margin-bottom: 18px; }
.sg-car-korak .of-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }

.sg-nacin-kartice { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sg-nacin-kartica {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer;
  padding: 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); font: inherit; color: var(--text);
}
.sg-nacin-kartica:hover { border-color: var(--border-strong); }
.sg-nacin-kartica.active { border: 2px solid var(--primary); box-shadow: var(--halo); padding: 13px; }
.sg-nacin-kartica-ikona { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 22px; }
.sg-nacin-kartica-naziv { font-size: 15px; font-weight: 700; }
.sg-nacin-kartica-opis { font-size: 12.5px; color: var(--text-faint); }

.sg-car-dno {
  display: flex; align-items: center; gap: 12px; padding: 16px 36px;
  background: var(--bg-card); border-top: 1px solid var(--border);
}
.sg-car-hint { flex: 1; text-align: right; font-size: 14px; color: var(--orange); display: inline-flex; justify-content: flex-end; align-items: center; gap: 6px; }
.sg-car-dno .btn { min-height: 46px; }
.sg-car-zavrsi { display: none; }
.sg-car[data-korak="4"] .sg-car-zavrsi { display: inline-flex; }
.sg-car[data-korak="4"] .sg-car-dalje { display: none; }
.sg-skriveno { display: none; }

.sg-car-pregled { display: flex; flex-direction: column; gap: 14px; }
.sg-pregled-kartica { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.sg-pregled-kartica-glava { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 4px; }
.sg-pregled-kartica strong { font-size: 16px; }
.sg-pregled-kartica > span { font-size: 14px; color: var(--text-muted); }
.sg-pregled-stavka { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.sg-pregled-stavka:last-child { border-bottom: none; }
.sg-link { background: none; border: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--primary); cursor: pointer; text-transform: none; letter-spacing: 0; }

.sg-car-desno { background: #EEF1F6; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sg-car-desno-labela { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); display: flex; align-items: center; gap: 8px; }
.sg-papir {
  flex: 1; background: #FFFFFF; border-radius: 6px; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 2px rgba(10, 20, 48, .06), 0 18px 40px -16px rgba(10, 20, 48, .22);
}
.sg-papir-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.sg-papir-broj { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.sg-papir-nacrt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: var(--st-nacrt-bg); color: var(--st-nacrt-fg); }
.sg-papir-strane { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sg-papir-strane > div, .sg-papir-blok { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 8px; font-size: 13px; color: var(--text-muted); min-width: 0; }
.sg-papir-strane strong, .sg-papir-blok strong { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.sg-papir-labela { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.sg-papir-aktivno { background: var(--primary-50); outline: 1.5px dashed var(--primary-300); }
.sg-papir-stavke { display: flex; flex-direction: column; border-radius: 8px; padding: 6px; }
.sg-papir-stavke-glava, .sg-papir-stavka { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; font-size: 13px; padding: 6px 4px; }
.sg-papir-stavke-glava { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.sg-papir-stavka { border-bottom: 1px dashed var(--border); }
.sg-papir-prazno { font-size: 13px; color: var(--text-faint); padding: 8px 4px; }
.sg-papir-dno { margin-top: auto; font-size: 11.5px; color: var(--text-faint); border-top: 1px solid var(--border); padding-top: 10px; }

@media (max-width: 1280px) {
  .sg-car { grid-template-columns: 250px minmax(0, 1fr) 320px; }
}

/* Korak 6: kartice kupaca za brz izbor */
.sg-car-kupci-naslov { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin: 4px 0 10px; }
.sg-car-kupci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sg-kupac-kartica {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  padding: 16px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border); font: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.sg-kupac-kartica:hover { border-color: var(--primary); box-shadow: var(--halo); }
.sg-kupac-tekst { display: flex; flex-direction: column; min-width: 0; }
.sg-kupac-naziv { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-kupac-adresa { font-size: 13.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-kupac-pib { font-size: 12px; color: var(--text-faint); }

/* Korak 6: u čarobnjaku način otpreme biraju kartice — padajući meni ostaje (kartice ga postavljaju), ali se ne prikazuje */
.sg-car .field:has(> #no-t-nacin), .sg-car .field:has(#no-t-nacin) { display: none; }

/* ── Signal korak 7: lista odlaznih ─────────────────────────── */
.sg-odl-cipovi { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.sg-odl-cip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card);
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.sg-odl-cip:hover { border-color: var(--primary); }
.sg-odl-cip.aktivan { background: var(--ink, #0A1430); border-color: var(--ink, #0A1430); color: #fff; }
.sg-odl-cip-broj { font-size: 12.5px; font-weight: 600; color: var(--text-faint); }
.sg-odl-cip.aktivan .sg-odl-cip-broj { color: rgba(255, 255, 255, .7); }

.sg-odl-tabela .sg-odl-red { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 96px 130px minmax(0, 1.1fr) 170px; }
.sg-odl-pib { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-odl-broj { font-family: var(--font-mono); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-odl-akcije { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.sg-odl-akcije .btn { white-space: nowrap; }
.sg-odl-storno { background: var(--bg-card); color: #B42318; border: 1px solid #F5C2BD; }
.sg-odl-storno:hover { background: #FDE7E6; }
.sg-odl-ikona {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card);
  color: var(--text-muted); font-size: 18px; cursor: pointer;
}
.sg-odl-ikona:hover { border-color: var(--primary); color: var(--primary); }
.sg-odl-red.is-novo { box-shadow: inset 3px 0 0 #EF4444; }
@media (max-width: 1100px) {
  .sg-odl-tabela .sg-odl-red { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr) 150px; }
  .sg-odl-tabela .sg-odl-red > :nth-child(3), .sg-odl-tabela .sg-odl-red > :nth-child(4) { display: none; }
}

/* ── Potvrda unutar aplikacije (zamena za window.confirm) ───── */
.sg-potvrda-sloj {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 20, 48, .45); backdrop-filter: blur(3px); animation: sgPotvrdaSloj .14s ease both;
}
.sg-potvrda-sloj.zatvara { opacity: 0; transition: opacity .12s; }
.sg-potvrda {
  width: min(440px, 100%); background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: 20px; padding: 26px 26px 20px;
  box-shadow: 0 24px 60px rgba(10, 20, 48, .28); animation: sgPotvrda .18s cubic-bezier(.2, .9, .3, 1.2) both;
}
.sg-potvrda-ikona {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: #EAEFFF; color: var(--primary); font-size: 24px; margin-bottom: 14px;
}
.sg-potvrda.opasno .sg-potvrda-ikona { background: #FDE7E6; color: #B42318; }
.sg-potvrda h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.sg-potvrda p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-muted); }
.sg-potvrda-dugmad { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes sgPotvrdaSloj { from { opacity: 0; } to { opacity: 1; } }
@keyframes sgPotvrda { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

.sg-potvrda-polje { margin-top: 16px; }
.sg-potvrda-polje textarea { width: 100%; resize: vertical; }
.sg-potvrda .btn-danger { background: #D92D20; border-color: #D92D20; color: #fff; }
.sg-potvrda .btn-danger:hover:not(:disabled) { background: #B42318; border-color: #B42318; }

/* Odlazna poslata, CIP još nije potvrdio — ikona peščanika se okreće */
.sg-pill-ceka i { animation: sgPescanik 1.6s ease-in-out infinite; }
@keyframes sgPescanik { 0%, 40% { transform: rotate(0); } 60%, 100% { transform: rotate(180deg); } }

/* Greška unutar prozora (umesto obaveštenja u uglu iza zatamnjenja) */
.prozor-greska {
  display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 10px 12px;
  border: 1px solid #F5C2BD; border-radius: 10px; background: #FDE7E6; color: #B42318;
  font-size: 13.5px; font-weight: 600; line-height: 1.4; white-space: pre-line;
}
.modal .prozor-greska { margin: 0 24px 12px; }
.prozor-greska i { font-size: 18px; flex-shrink: 0; }
.prozor-greska.trese { animation: prozorTrese .3s ease; }
.polje-greska, .polje-greska:focus { border-color: #D92D20 !important; box-shadow: 0 0 0 3px rgba(217, 45, 32, .15) !important; }
@keyframes prozorTrese { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Filter po statusu pored čipova (Odlazne) */
.sg-odl-filteri { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.sg-odl-filteri .sg-odl-cipovi { margin: 0; }
.sg-odl-stanje {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text-muted);
}
.sg-odl-stanje.aktivan { border-color: var(--primary); color: var(--primary); }
.sg-odl-stanje select {
  border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  padding: 0 6px; height: 100%; cursor: pointer; outline: none;
}

/* Filter po statusu iznad tabele dolaznih */
.sg-dol-alat { display: flex; justify-content: flex-end; margin: -4px 0 12px; }

/* ── Signal korak 8: Početna ────────────────────────────────── */
.sg-pocetna { display: flex; flex-direction: column; gap: 22px; }
.sg-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 28px 30px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(18, 181, 165, .22) 0%, rgba(18, 181, 165, 0) 45%),
              radial-gradient(90% 120% at 0% 100%, rgba(51, 85, 255, .35) 0%, rgba(51, 85, 255, 0) 55%), var(--ink);
}
.sg-hero-datum { font-size: 14px; font-weight: 600; color: #9DB0FF; }
.sg-hero-naslov { margin: 4px 0 6px; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.sg-hero-tekst { margin: 0; font-size: 16px; color: rgba(255, 255, 255, .82); }
.sg-hero-tekst b { color: #fff; font-weight: 700; }
.sg-hero-tekst .sg-hero-istak { color: #FACC15; }
.sg-hero-dugmad { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sg-hero .sg-belo-dugme { background: #fff; color: var(--ink); border: none; font-weight: 700; min-height: 46px; padding: 0 20px; }
.sg-hero .sg-belo-dugme:hover:not(:disabled) { background: #EEF2FF; }
.sg-hero .sg-belo-dugme:disabled { opacity: .55; cursor: not-allowed; }
.sg-hero .sg-tamno-dugme { background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid rgba(255, 255, 255, .22); font-weight: 700; min-height: 46px; padding: 0 20px; }
.sg-hero .sg-tamno-dugme:hover { background: rgba(255, 255, 255, .12); }
.sg-hero-kpi { display: grid; grid-template-columns: repeat(3, 190px); gap: 12px; }
.sg-kpi {
  display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 16px 18px; min-height: 160px;
  border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  color: #fff; font: inherit; cursor: pointer; transition: background .15s, border-color .15s;
}
.sg-kpi:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.sg-kpi-naziv { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.sg-kpi-naziv i { font-size: 17px; }
.sg-kpi-broj { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.sg-kpi-dno { font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.sg-mini { display: flex; align-items: flex-end; gap: 4px; height: 26px; margin-top: auto; }
.sg-mini span { flex: 1; border-radius: 3px 3px 1px 1px; background: rgba(255, 255, 255, .18); min-height: 3px; }

.sg-poc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; }
.sg-poc-kartica { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px 18px; }
.sg-poc-naslov-red { display: flex; align-items: center; justify-content: space-between; }
.sg-poc-naslov { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.sg-poc-broj { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #FFF3DC; color: #A45A00; font-size: 12.5px; font-weight: 700; }
.sg-paznja { display: flex; flex-direction: column; gap: 10px; }
.sg-paznja-red {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #FAFBFD;
}
.sg-paznja-tekst { min-width: 0; }
.sg-paznja-naslov { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-paznja-pod { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-paznja-red .btn { white-space: nowrap; }
.sg-poc-vise { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }

/* Ova nedelja — naslagani stubići (paleta proverena: #3355FF / #F97316 / #B42318) */
.sg-ned-zaglavlje { display: flex; align-items: baseline; gap: 10px; color: var(--text-muted); font-size: 14.5px; margin: -4px 0 14px; }
.sg-ned-veliki { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.sg-ned-grafikon { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; height: 170px; }
.sg-ned-dan { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; border-radius: 8px; outline: none; }
.sg-ned-dan:focus-visible { box-shadow: 0 0 0 3px rgba(51, 85, 255, .25); }
.sg-ned-stub-mesto { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.sg-ned-zbir { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.sg-ned-stub { width: min(30px, 70%); display: flex; flex-direction: column-reverse; gap: 2px; }
.sg-ned-stub span { min-height: 3px; }
.sg-ned-stub span:last-child { border-radius: 4px 4px 0 0; }
.sg-ned-dan:hover .sg-ned-stub { filter: brightness(1.08); }
.sg-seg-p { background: #3355FF; }
.sg-seg-r { background: #F97316; }
.sg-seg-o { background: #B42318; }
.sg-ned-ime { font-size: 13px; color: var(--text-muted); }
.sg-ned-dan.danas .sg-ned-ime { color: var(--text); font-weight: 800; }
.sg-ned-dan.buducnost .sg-ned-ime { color: var(--text-faint); }
.sg-ned-legenda { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.sg-ned-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.sg-ned-legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Na putu ka vama */
.sg-naputu-red {
  display: grid; grid-template-columns: auto minmax(0, 220px) minmax(0, 1fr) 170px; align-items: center; gap: 16px;
  padding: 12px 6px; border-top: 1px solid var(--border);
}
.sg-naputu-tekst { min-width: 0; }
.sg-naputu-traka { position: relative; height: 6px; border-radius: 3px; background: #E9EDF5; margin: 0 16px; }
.sg-naputu-puno { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #9DB0FF, var(--primary)); }
.sg-naputu-kamion {
  position: absolute; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 2px solid var(--primary); color: var(--primary); font-size: 14px;
}
.sg-naputu-desno { text-align: right; min-width: 0; }
.sg-naputu-faza { font-size: 14.5px; font-weight: 700; }

@media (max-width: 1280px) {
  .sg-hero { grid-template-columns: minmax(0, 1fr); }
  .sg-hero-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sg-poc-grid { grid-template-columns: minmax(0, 1fr); }
  .sg-naputu-red { grid-template-columns: auto minmax(0, 1fr) 130px; }
  .sg-naputu-traka { display: none; }
}

/* Početna — dubinski efekat hero trake: mirni slojevi boje, BEZ animacije (animirani „stakleni"
   odsjaj je korisnika umarao, 13.11.2026). Svetlo pada odozgo levo (indigo), ljubičasta dubina
   dole u sredini, tirkiz dole desno; ivice blago zatamnjene (vinjeta); pločice „utisnute". */
.sg-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(124, 147, 255, .55) 0%, rgba(124, 147, 255, 0) 58%),
    radial-gradient(60% 90% at 38% 110%, rgba(110, 72, 240, .62) 0%, rgba(110, 72, 240, 0) 62%),
    radial-gradient(70% 110% at 100% 100%, rgba(18, 181, 165, .58) 0%, rgba(18, 181, 165, 0) 58%),
    radial-gradient(50% 80% at 100% 0%, rgba(51, 85, 255, .45) 0%, rgba(51, 85, 255, 0) 62%),
    linear-gradient(135deg, #101B46 0%, #0A1430 55%, #071026 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    inset 0 -40px 80px -48px rgba(3, 8, 24, .55),
    inset 0 0 90px rgba(3, 8, 24, .18),
    0 22px 48px -24px rgba(23, 40, 140, .55);
}
.sg-hero > * { position: relative; z-index: 1; }
.sg-kpi {
  background: linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .03) 100%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -12px 24px -16px rgba(0, 0, 0, .45),
              0 12px 24px -16px rgba(0, 0, 0, .55);
}
.sg-kpi:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .05) 100%);
  border-color: rgba(157, 176, 255, .35); }
.sg-hero .sg-belo-dugme { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55); }

/* Greška pri slanju u „Zahteva vašu pažnju" i u rečenici heroja */
.sg-paznja-red.sg-paznja-greska { background: #FFF6F5; border-color: #F5C2BD; }
.sg-hero-tekst .sg-hero-greska { color: #FCA5A5; }

/* ── Signal korak 9: ostale strane (samo izgled, logika netaknuta) ──────────
   README/PLAN: kartice r16 sa ivicom bez senke, naslovi 28/700, zaglavlja tabela 12px uppercase,
   prazna stanja sa ikonom i sledećim korakom, prijava u istom stilu. */
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { font-size: 14.5px; }
.card, .list-card, .table-wrap, .data-table-wrap { border-radius: 16px; box-shadow: none; }
.table thead th, .data-table thead th, .list-head {
  background: #FAFBFD; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint);
}
.section-title { font-size: 18px; letter-spacing: -0.01em; }

/* Prazna stanja: ikona u mekom krugu, bez emodžija */
.empty-icon {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: #EEF2FF; color: var(--primary); font-size: 30px; opacity: 1; margin-bottom: 8px;
}
.empty-state { padding: 64px 20px; }
.empty-state h3 { font-weight: 700; }

/* Modalni prozori u istom jeziku kao potvrde (sg-potvrda) */
.modal-overlay { background: rgba(10, 20, 48, .45); backdrop-filter: blur(3px); }
.modal, .modal-box { border-radius: 20px; box-shadow: 0 24px 60px rgba(10, 20, 48, .28); }
.modal-header { padding: 22px 26px 16px; border-bottom-color: #EEF1F6; }
.modal-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.modal-close:hover { background: var(--bg-hover); color: var(--text); }
.modal-footer { border-top-color: #EEF1F6; }

/* Prijava: tamni panel sa dubinom (kao hero na Početnoj) + forma */
.login-page.sg-login {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); padding: 0;
  background: var(--bg); background-image: none; align-items: stretch;
}
.sg-login-panel {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 48px; color: #fff; overflow: hidden;
  background:
    radial-gradient(80% 70% at 0% 0%, rgba(124, 147, 255, .5) 0%, rgba(124, 147, 255, 0) 60%),
    radial-gradient(60% 60% at 40% 105%, rgba(110, 72, 240, .55) 0%, rgba(110, 72, 240, 0) 62%),
    radial-gradient(70% 70% at 100% 100%, rgba(18, 181, 165, .5) 0%, rgba(18, 181, 165, 0) 58%),
    linear-gradient(135deg, #101B46 0%, #0A1430 55%, #071026 100%);
}
.sg-login-poruka { max-width: 520px; margin-bottom: 8vh; }
.sg-login-poruka h2 { margin: 0 0 12px; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.sg-login-poruka p { margin: 0 0 26px; font-size: 16.5px; line-height: 1.55; color: rgba(255, 255, 255, .78); }
.sg-login-poruka ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sg-login-poruka li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 600; }
.sg-login-poruka li i {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 18px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #9DB0FF;
}
.sg-login .login-card {
  align-self: center; justify-self: center; max-width: 400px; margin: 24px;
  border: none; box-shadow: none; background: transparent; padding: 32px 8px;
}
.sg-login .login-logo .sg-logo-znak { width: 36px; height: 36px; font-size: 20px; }
.sg-login .login-logo .logo-name { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.sg-login .login-title { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.sg-login .btn-full { min-height: 50px; font-size: 16px; }
@media (max-width: 900px) {
  .login-page.sg-login { grid-template-columns: minmax(0, 1fr); }
  .sg-login-panel { display: none; }
}
.sg-login .login-logo { display: none; }
@media (max-width: 900px) { .sg-login .login-logo { display: flex; } }

/* Broj prijemnice u redu odlaznih i u panelu dolaznih */
.sg-odl-prijemnica { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.sg-panel-prijemnica { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: #F5F7FF; font-size: 13.5px; color: var(--text-muted); }
.sg-panel-prijemnica i { color: var(--primary); font-size: 16px; }
.sg-panel-prijemnica strong { color: var(--text); }

.sg-sync-traka { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--text-muted); }
.sg-panel-prijemnica { display: block; line-height: 1.5; }
.sg-panel-prijemnica i { vertical-align: -3px; margin-right: 4px; }
.sg-panel-prijemnica strong { word-break: break-all; }

.sg-badge-nove { width: auto; padding: 0 8px; border-radius: 999px; }

/* ── Razlike pri prijemu: vraćeno / manjak / razlog (14.11.2026) ── */
.sg-r-vraceno { color: #B42318; font-weight: 700; }
.sg-r-manjak { color: #B4400F; font-weight: 700; }
.sg-r-red { margin-top: 4px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.sg-r-razlog { margin-top: 2px; font-size: 12px; font-style: italic; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sg-razlog-celija { font-size: 13px; font-style: italic; color: var(--text-muted); max-width: 260px; }
.sg-napomena-prijemnice {
  display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px;
  border-radius: 12px; background: #FFF6EC; border: 1px solid #F8D9B5; color: var(--text);
}
.sg-napomena-prijemnice.odbijeno { background: #FFF6F5; border-color: #F5C2BD; }
.sg-napomena-prijemnice i { font-size: 20px; color: #B4400F; margin-top: 1px; }
.sg-napomena-prijemnice.odbijeno i { color: #B42318; }
.sg-napomena-prijemnice strong { display: block; font-size: 13px; }
.sg-napomena-prijemnice p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.sg-panel .sg-napomena-prijemnice { margin: 12px 0 0; }
.sg-stavka-prijem span { display: flex; flex-direction: column; min-width: 0; }
.sg-stavka-prijem small { font-size: 12px; color: var(--text-muted); }
.sg-odl-cip.sg-cip-razlike { border-color: #F8D9B5; color: #B4400F; }
.sg-odl-cip.sg-cip-razlike i { font-size: 15px; }
.sg-odl-cip.sg-cip-razlike.aktivan { background: #B4400F; border-color: #B4400F; color: #fff; }
.sg-dol-alat { gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.sg-dol-alat .sg-dol-brzi { margin: 0; }
.sg-paznja-red.sg-paznja-razlike { background: #FFF8F1; border-color: #F8D9B5; }

/* ============================================================
   Telefon (mobilni.js) — web na telefonu izgleda kao Flutter aplikacija (17.11.2026).
   Telefon = širina ispod 700px (isti upit kao M_TELEFON_UPIT u mobilni.js). Boje su
   „Signal" vrednosti iz README, kao u Flutter AppColors.
   ============================================================ */
.m-app {
  --m-ink: #0A1430; --m-primary: #3355FF; --m-primary-d: #2441E0; --m-primary-50: #EEF2FF;
  --m-teal: #12B5A5; --m-teal-3: #3EE0CF; --m-canvas: #F3F5FA; --m-surface: #FFFFFF;
  --m-border: #E4E8F1; --m-border-2: #D5DBE8; --m-text: #0E1726; --m-text-2: #4A5568; --m-text-3: #7A8599;
  --m-ok: #0F7A4A; --m-warn: #A45A00; --m-danger: #B42318;
  min-height: 100vh; min-height: 100dvh;
  background: var(--m-canvas); color: var(--m-text);
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
}
@media (max-width: 699px) {
  body { background: #F3F5FA; }
  /* Toast iznad donje trake. */
  #toasts { bottom: calc(104px + env(safe-area-inset-bottom)) !important; left: 12px !important; right: 12px !important; }
  /* Prozori (fizički prijem, storno, odbijanje, potvrde, čarobnjak) kao donji list preko celog ekrana. */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal-box, .modal-lg { max-width: 100%; width: 100%; border-radius: 20px 20px 0 0; max-height: 94vh; max-height: 94dvh; }
  .modal-footer { flex-wrap: wrap; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-footer .btn { flex: 1 1 auto; min-height: 46px; }
  .sg-potvrda { width: calc(100% - 24px); }
  .field-row { grid-template-columns: 1fr; }
}
.m-sa-trakom { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.m-app button { font-family: inherit; }
.m-mono { font-family: 'JetBrains Mono', var(--font-mono), monospace; font-size: 12.5px; color: var(--m-text-3); }
.m-mono-jako { font-family: 'JetBrains Mono', var(--font-mono), monospace; font-size: 15px; font-weight: 600; color: var(--m-text); }

/* Naslovi i zaglavlja */
.m-naslov { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 10px; }
.m-naslov h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.m-zaglavlje { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--m-canvas); }
.m-zaglavlje h1 { font-size: 18px; font-weight: 700; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-zaglavlje-belo { background: #fff; }
.m-zaglavlje-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-zaglavlje-tekst strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-ikona-dugme { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--m-text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; cursor: pointer; }
.m-ikona-dugme:disabled { opacity: .4; }
.m-strana-glava { background: var(--m-canvas); }
.m-sadrzaj { padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.m-sekcija { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--m-text-3); margin: 12px 4px 0; }

/* Kartice i redovi */
.m-kartica { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 16px; padding: 16px; text-align: left; color: inherit; width: 100%; box-sizing: border-box; }
button.m-kartica { display: block; font: inherit; cursor: pointer; }
.m-kartica-red { display: flex; align-items: center; gap: 12px; width: 100%; }
.m-kartica-vrh { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.m-kartica-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-ime { font-size: 16px; font-weight: 700; color: var(--m-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.m-ime-veliko { font-size: 19px; letter-spacing: -.01em; white-space: normal; }
.m-pod { font-size: 13.5px; color: var(--m-text-2); }
.m-app .ph-caret-right { color: var(--m-text-3); font-size: 18px; flex-shrink: 0; }
.m-kartica-dno { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--m-text-2); }
.m-lista { padding: 0; overflow: hidden; }
.m-red { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0;
  border-top: 1px solid var(--m-border); text-align: left; font: inherit; color: inherit; cursor: pointer; box-sizing: border-box; }
.m-lista > .m-red:first-child { border-top: 0; }
.m-red-bez { border-top: 0; padding: 0; }
.m-red-ikona { width: 40px; height: 40px; border-radius: 12px; background: var(--m-primary-50); color: var(--m-primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.m-red-ikona.m-teal { background: #E6F8F6; color: var(--m-teal); }
.m-paznja-ikona { font-size: 24px; flex-shrink: 0; }
.m-link { background: none; border: 0; color: var(--m-primary); font-weight: 700; font-size: 14.5px; padding: 8px 4px; cursor: pointer; }
.m-razlog { display: block; margin-top: 6px; font-size: 13px; font-style: italic; color: var(--m-text-2); }
.m-ok { color: var(--m-ok); font-weight: 700; }
.m-razlika { color: #B4400F; font-weight: 700; }
.m-dva { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-polje { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.m-polje > span { font-size: 12.5px; color: var(--m-text-3); }
.m-polje > strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pretraga i čipovi */
.m-pretraga { display: flex; align-items: center; gap: 10px; margin: 0 16px; padding: 0 6px 0 14px; height: 48px;
  background: #fff; border: 1px solid var(--m-border-2); border-radius: 12px; color: var(--m-text-3); font-size: 20px; }
.m-pretraga input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--m-text); }
.m-pretraga:focus-within { border-color: var(--m-primary); box-shadow: 0 0 0 4px rgba(51,85,255,.12); }
.m-pretraga-x { border: 0; background: none; color: var(--m-text-3); width: 40px; height: 40px; font-size: 18px; }
.m-cipovi { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 10px; scrollbar-width: none; }
.m-cipovi::-webkit-scrollbar { display: none; }
.m-cipovi-mali { padding: 0 0 4px; }
.m-cipovi-mali .sg-odl-cipovi { display: flex; gap: 8px; flex-wrap: nowrap; }
.m-cip, .m-cipovi .sg-odl-cip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--m-border); background: #fff; color: var(--m-text); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.m-cip span { color: var(--m-text-3); font-weight: 600; }
.m-cip.aktivan, .m-cipovi .sg-odl-cip.aktivan { background: var(--m-ink); border-color: var(--m-ink); color: #fff; }
.m-cip.aktivan span { color: #C9D2E6; }

/* Kartice listi */
.m-dol-kartica.is-novo, .m-odl-kartica.is-novo { border-color: #C7D2FE; }
.m-odl-dno { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.m-odl-dno .btn { min-height: 42px; border-radius: 12px; }
.m-vise { width: 100%; min-height: 46px; }
.m-strane { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--m-text-2); font-size: 14px; }
.m-nova { min-height: 40px; border-radius: 12px; }

/* Prazno / skeleton / upozorenja */
.m-prazno { text-align: center; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.m-prazno h3 { margin: 6px 0 0; font-size: 16px; }
.m-prazno p { margin: 0; color: var(--m-text-2); font-size: 14px; line-height: 1.4; }
.m-prazno-ikona { width: 64px; height: 64px; border-radius: 18px; background: var(--m-primary-50); color: var(--m-primary);
  display: flex; align-items: center; justify-content: center; font-size: 30px; }
.m-skel-kartica { height: 96px; border-radius: 16px; background: linear-gradient(90deg, #EEF1F6, #F7F9FF, #EEF1F6); background-size: 200% 100%; animation: m-shimmer 1.4s infinite; }
@keyframes m-shimmer { to { background-position: -200% 0; } }
.m-upozorenje { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; text-align: left; box-sizing: border-box;
  background: #FDE7E6; border: 1px solid #F5C2BD; color: var(--m-danger); font: inherit; font-size: 14px; font-weight: 600; }
.m-upozorenje i { font-size: 20px; flex-shrink: 0; }
.m-info { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--m-primary-50, #EEF2FF);
  color: #2441E0; font-size: 14px; line-height: 1.4; flex: 1; }
.m-info i { font-size: 20px; flex-shrink: 0; }
.m-novo-lista { display: flex; flex-direction: column; gap: 8px; }
.m-novo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid #C7D2FE;
  background: var(--m-primary-50); color: var(--m-primary-d); font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; }
.m-sve-ok { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.m-sve-ok i { color: var(--m-ok); font-size: 24px; }
.m-vrti { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: mSpin .7s linear infinite; }
@keyframes mSpin { to { transform: rotate(360deg); } }

/* Početna */
.m-hero { position: relative; padding: calc(12px + env(safe-area-inset-top)) 16px 0; color: #fff; margin-bottom: 4px;
  background:
    radial-gradient(500px 260px at 95% -20%, rgba(18,181,165,.5), transparent 60%),
    radial-gradient(520px 300px at 0% 120%, rgba(51,85,255,.65), transparent 60%),
    #0A1430; }
.m-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: var(--m-canvas); }
.m-hero > * { position: relative; z-index: 1; }
.m-hero-red { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-firma { display: inline-flex; align-items: center; gap: 6px; max-width: 75%; padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 13.5px; font-weight: 700; }
.m-firma span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-firma .ph-storefront { color: var(--m-teal-3); font-size: 16px; }
.m-avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3355FF, #12B5A5); color: #fff; font-weight: 800; font-size: 14px; }
.m-avatar-veliki { width: 54px; height: 54px; font-size: 18px; }
.m-podrska { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px;
  border-radius: 10px; background: rgba(250,204,21,.16); color: #FDE68A; font-size: 13px; font-weight: 600; }
.m-podrska button { border: 0; border-radius: 8px; padding: 6px 10px; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; }
.m-hero h1 { margin: 18px 0 2px; font-size: 26px; font-weight: 700; letter-spacing: -.025em; color: #fff; }
.m-hero p { margin: 0 0 18px; color: #C9D2E6; font-size: 15px; }
.m-brojevi { display: flex; background: #fff; border-radius: 18px; box-shadow: 0 10px 24px -8px rgba(10,20,48,.25); }
.m-broj { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px; border: 0; background: none; font: inherit; cursor: pointer; }
.m-broj:disabled { cursor: default; }
.m-broj + .m-broj { border-left: 1px solid var(--m-border); }
.m-broj strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.m-broj span { font-size: 12.5px; color: var(--m-text-2); font-weight: 600; text-align: center; }
.m-kartica-ceka { border-color: #FCE3B0; display: flex; flex-direction: column; gap: 14px; }
.m-cta-srednji { width: 100%; min-height: 50px; border-radius: 14px; font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.m-traka-napretka { display: block; height: 5px; border-radius: 4px; background: #EEF1F6; margin-top: 8px; overflow: hidden; }
.m-traka-napretka > span { display: block; height: 100%; background: #3355FF; border-radius: 4px; }
.m-traka-napretka.ok > span { background: #16A34A; }
.m-traka-napretka.visak > span { background: #F97316; }

/* Donja traka 88px sa centralnim dugmetom skenera (62×62, radijus 20, brend gradijent, beli prsten 5px) */
.m-traka { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: stretch;
  height: calc(70px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box;
  background: #fff; border-top: 1px solid #E4E8F1; font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif; }
.m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #7A8599; min-width: 0; }
.m-tab.aktivan { color: #3355FF; }
.m-tab-ikona { position: relative; font-size: 25px; line-height: 1; }
.m-tab-naziv { font-size: 12.5px; font-weight: 600; }
.m-tab.aktivan .m-tab-naziv { font-weight: 700; }
.m-bedz { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; border: 2px solid #fff;
  background: #F59E0B; color: #0A1430; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-sizing: content-box; }
.m-tab-mesto { flex: 1; position: relative; }
.m-fab { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); width: 72px; height: 72px; border-radius: 24px;
  border: 5px solid #fff; background: linear-gradient(135deg, #3355FF, #12B5A5); color: #fff; font-size: 28px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -4px rgba(51,85,255,.6); cursor: pointer; }
.m-fab:disabled { opacity: .85; }

/* Detalj */
.m-pill-red { margin-top: 14px; }
.m-pravno { margin-top: 12px; font-family: 'JetBrains Mono', var(--font-mono), monospace; font-size: 11px; color: var(--m-text-3); }
.m-faze { display: flex; margin-top: 16px; }
.m-faza { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--m-text-3); text-align: center; }
.m-faza-krug { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #D5DBE8; background: #fff; color: #7A8599; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; font-size: 16px; }
.m-faza.gotovo, .m-faza.sledeca { color: var(--m-text); }
.m-faza.gotovo .m-faza-krug { background: var(--faza); border-color: var(--faza); color: #fff; }
.m-faza.sledeca .m-faza-krug { border-color: #3355FF; color: #3355FF; }
.m-prijemnica { display: flex; gap: 12px; align-items: flex-start; }
.m-prijemnica > i { font-size: 22px; color: var(--m-primary); }
.m-prijemnica.odbijeno { border-color: #F5C2BD; }
.m-prijemnica.odbijeno > i { color: var(--m-danger); }
.m-prijemnica div { display: flex; flex-direction: column; gap: 2px; }
.m-prijemnica b { margin-top: 6px; font-size: 12.5px; }
.m-prijemnica p { margin: 0; font-size: 14px; }
.m-stavke { padding: 4px 16px; }
.m-stavka { padding: 12px 0; border-top: 1px solid var(--m-border); }
.m-stavka:first-child { border-top: 0; }
.m-stavka-red { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.m-stavka-red strong { white-space: nowrap; }
.m-stavka-ispod { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--m-text-2); }
.m-razlika-red { margin-top: 8px; }
.m-razlika-red strong { color: #B4400F; }
.m-sa-cta { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.m-dno { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; align-items: stretch;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #E4E8F1; }
.m-cta { flex: 1; min-height: 56px; border-radius: 16px; font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.m-odbij { width: 86px; min-height: 56px; border-radius: 16px; background: #fff; border: 1px solid #F5C2BD; color: #B42318; font-weight: 700; font-size: 16px; }

/* Profil */
.m-profil { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.m-meni-red .m-ime { font-weight: 600; flex: 1; }
.m-cipovi.sg-odl-cipovi { flex-wrap: nowrap; margin: 0; }
.m-prekidac { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: #D5DBE8; position: relative; flex-shrink: 0; cursor: pointer; transition: background .2s; margin: 0; }
.m-prekidac::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.m-prekidac:checked { background: #3355FF; }
.m-prekidac:checked::after { transform: translateX(20px); }
.m-cip-red { padding: 10px 12px; }
.m-cip-red .sg-cip { width: 100%; margin: 0; background: #F7F9FF; border: 1px solid var(--m-border); }
.m-cip-red .sg-cip-naslov { color: var(--m-text); }
.m-cip-red .sg-cip-pod { color: var(--m-text-2); }
.m-odjava { min-height: 52px; border-radius: 14px; background: #fff; border: 1px solid #F5C2BD; color: #B42318; font-weight: 700; font-size: 16px; }

/* Ostali ekrani (Kupci, Vozila, Licence…) — postojeći sadržaj u jednoj koloni */
.m-ostalo-sadrzaj.main { padding: 4px 12px 24px; overflow: visible; }
.m-ostalo-sadrzaj .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
.m-ostalo-sadrzaj .page-title { font-size: 22px; }
.m-ostalo-sadrzaj table { display: block; overflow-x: auto; white-space: nowrap; }
.m-ostalo-sadrzaj .list-wrap, .m-ostalo-sadrzaj .sg-tabela, .m-ostalo-sadrzaj .card { overflow-x: auto; }
.m-ostalo-sadrzaj .detail-grid, .m-ostalo-sadrzaj .of-grid2 { grid-template-columns: 1fr; }

/* Prijem: brojanje i pregled */
.m-popuni { min-height: 38px; border-radius: 10px; border: 1px solid #9DB0FF; background: #fff; color: #3355FF; font-weight: 700; padding: 0 12px; flex-shrink: 0; }
.m-segmenti-omot { background: #fff; padding: 0 16px 10px; border-bottom: 1px solid var(--m-border); position: sticky; top: 64px; z-index: 4; }
.m-segmenti { display: flex; gap: 4px; }
.m-segmenti span { flex: 1; height: 5px; border-radius: 3px; }
.m-segmenti-tekst { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13.5px; }
.m-prijem .m-sadrzaj { padding-top: 14px; }
.m-brojac-kartica.razlika { border-color: #F8C9A8; }
.m-brojac { display: flex; gap: 8px; margin-top: 12px; }
.m-brojac-dugme { width: 52px; height: 46px; border-radius: 12px; border: 1px solid #D5DBE8; background: #fff; color: var(--m-text, #0E1726);
  font-size: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.m-brojac-dugme:disabled { color: #C2C9D6; }
.m-brojac-polje { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 0; background: #F3F5FA; text-align: center;
  font: inherit; font-size: 20px; font-weight: 800; color: var(--m-text); }
.m-brojac-polje:focus { outline: 2px solid #3355FF; }
.m-skener-kvadrat { width: 58px; min-height: 56px; border-radius: 16px; border: 0; background: var(--m-primary-50, #EEF2FF); color: #3355FF; font-size: 24px; }
.m-vraca-red { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.m-vraca-red b { width: 44px; text-align: center; font-size: 17px; }
.m-napomena { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; margin-top: 6px; }
.m-napomena span { color: var(--m-text-3); }
.m-napomena b { color: var(--m-text); }
.m-napomena textarea { font-size: 16px; border-radius: 12px; }

/* Skener (kamera) — video je u #m-kamera van #app, ispod prozirnog sloja */
#m-kamera { position: fixed; inset: 0; z-index: 0; background: #000; display: none; }
#m-kamera video { width: 100%; height: 100%; object-fit: cover; }
body.m-kamera-radi #m-kamera { display: block; }
body.m-kamera-radi .m-app { background: transparent; }
body.m-kamera-radi #app { position: relative; z-index: 1; }
.m-skener { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; color: #fff;
  background: radial-gradient(400px 400px at 50% 40%, rgba(255,255,255,.05), transparent 70%), #0A1430; }
body.m-kamera-radi .m-skener { background: rgba(10,20,48,.25); }
.m-skener-vrh { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
.m-skener-naslov { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.m-skener-naslov strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-skener-naslov span { font-size: 13.5px; color: #C9D2E6; }
.m-krug { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-krug:disabled { opacity: .35; }
.m-krug.ukljucen { color: #FACC15; }
.m-skener-sredina { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.m-okvir { position: relative; width: 270px; height: 170px; --ugao: #3EE0CF; }
.m-okvir.blic-ok { --ugao: #22C55E; }
.m-okvir.blic-greska { --ugao: #F97316; }
.m-okvir .u { position: absolute; width: 34px; height: 34px; border: 4px solid var(--ugao); transition: border-color .15s; }
.m-okvir .gl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.m-okvir .gd { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.m-okvir .dl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.m-okvir .dd { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.m-laser { position: absolute; left: 12px; right: 12px; height: 2px; top: 10%; background: #3EE0CF; box-shadow: 0 0 10px rgba(62,224,207,.6);
  animation: mLaser 2.2s ease-in-out infinite; }
@keyframes mLaser { 0%, 100% { top: 10%; } 50% { top: 86%; } }
@media (prefers-reduced-motion: reduce) { .m-laser { animation: none; top: 48%; } .m-skel-kartica { animation: none; } }
.m-kamera-pali { display: flex; align-items: center; gap: 8px; color: #C9D2E6; font-size: 14px; }
.m-kamera-poruka { text-align: center; max-width: 320px; color: #C9D2E6; }
.m-kamera-poruka i { font-size: 44px; color: #9DB0FF; }
.m-kamera-poruka h3 { color: #fff; margin: 12px 0 6px; font-size: 18px; }
.m-kamera-poruka p { margin: 0; font-size: 14.5px; line-height: 1.4; }
.m-sken-list { margin: 0 10px calc(10px + env(safe-area-inset-bottom)); padding: 16px 16px 12px; border-radius: 24px; background: #fff; color: #0E1726;
  display: flex; flex-direction: column; gap: 12px; }
.m-sken-red { display: flex; align-items: center; gap: 12px; }
.m-sken-ikona { width: 46px; height: 46px; border-radius: 14px; background: #E3F6EC; color: #0F7A4A; font-size: 22px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-sken-ikona.visak { background: #FDEBDF; color: #B4400F; }
.m-sken-ikona.greska { background: #FDE7E6; color: #B42318; }
.m-sken-ikona.prazno { background: #EEF1F6; color: #7A8599; }
.m-sken-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; color: #4A5568; }
.m-sken-tekst strong { font-size: 16px; color: #0E1726; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-sken-tekst .visak { color: #B4400F; font-weight: 700; }
.m-sken-tekst.greska { color: #B42318; font-weight: 600; font-size: 14.5px; }
.m-plus1 { font-size: 22px; font-weight: 800; color: #0F7A4A; }
.m-plus1.visak { color: #B4400F; }
.m-rucno { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1px solid #D5DBE8; border-radius: 12px; color: #7A8599; font-size: 18px; }
.m-rucno input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; color: #0E1726; background: transparent; }
.m-dugmad { display: flex; gap: 10px; }
.btn-tamno { flex: 1; min-height: 52px; border-radius: 14px; background: #0A1430; color: #fff; border: 0; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Uspeh */
.m-uspeh { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; box-sizing: border-box;
  padding: calc(48px + env(safe-area-inset-top)) 20px calc(16px + env(safe-area-inset-bottom));
  background: radial-gradient(360px 300px at 50% 18%, rgba(18,181,165,.35), transparent 70%), #0A1430; }
.m-uspeh-krug { width: 136px; height: 136px; border-radius: 50%; padding: 16px; box-sizing: border-box; background: rgba(62,224,207,.12); animation: mPop .45s ease-out; }
.m-uspeh-krug span { width: 104px; height: 104px; border-radius: 50%; background: #3EC9B8; color: #0A1430; font-size: 48px;
  display: flex; align-items: center; justify-content: center; }
@keyframes mPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .m-uspeh-krug { animation: none; } }
.m-uspeh h1 { margin: 22px 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.m-uspeh p { margin: 0; color: #C9D2E6; font-size: 15.5px; line-height: 1.4; }
.m-uspeh-rezime { width: 100%; margin-top: 24px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; }
.m-uspeh-rezime div { display: flex; justify-content: space-between; color: #C9D2E6; }
.m-uspeh-rezime b { color: #fff; }
.m-uspeh-dno { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.m-belo { min-height: 56px; border-radius: 16px; background: #fff; color: #0A1430; border: 0; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.m-belo i { color: #3355FF; }
.m-providno { min-height: 52px; border-radius: 16px; background: rgba(255,255,255,.05); color: #fff; border: 1px solid rgba(255,255,255,.25); font-weight: 700; font-size: 16px; }

/* Telefon: čarobnjak „Nova otpremnica" u jednoj koloni — gore Odustani + koraci u redu, ispod forma.
   Pregled papira (desna kolona) se sakriva; korak 4 ima svoj pregled. */
@media (max-width: 699px) {
  .sg-car { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .sg-car-levo { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .sg-car-glavni { font-size: 18px; flex: 1; margin: 0; }
  .sg-car-koraci { flex-direction: row; width: 100%; gap: 6px; }
  .sg-car-korak-stavka { flex: 1; padding: 0; gap: 0; justify-content: center; }
  .sg-car-korak-stavka::before, .sg-car-korak-stavka::after { display: none; }
  .sg-car-korak-tekst { display: none; }
  .sg-car-popunjenost { display: none; }
  .sg-car-desno { display: none; }
  .sg-car-forma { padding: 16px 14px 24px; }
  .sg-car-naslov { font-size: 22px; }
  .sg-car-dno { flex-wrap: wrap; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .sg-car-hint { flex-basis: 100%; order: -1; justify-content: flex-start; text-align: left; }
  .sg-car-dno .btn { flex: 1 1 auto; }
  .sg-car-kupci-grid { grid-template-columns: 1fr; }
  .m-ostalo-sadrzaj .page-title-group .page-title { display: none; }   /* naslov je već u zaglavlju telefona */
}

/* Profil na računaru (/profil): isti sadržaj kao na telefonu, u glavnom delu. */
.m-ugradjen { min-height: 0; background: transparent; max-width: 640px; }
.m-ugradjen .m-profil { padding: 0; }

/* Toast „Signal" (README „Globalno"): dole u sredini, teget, radijus 14, ikona u kvadratu 30px.
   Stara tamna tema zadržava svoj izgled (desno dole), ali dobija ikonu. */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-ikona { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); font-size: 18px; }
.toast-tekst { min-width: 0; }
[data-theme="light"] #toasts { left: 50%; right: auto; bottom: 24px; transform: translateX(-50%); align-items: center; width: max-content; max-width: calc(100vw - 32px); }
[data-theme="light"] .toast { background: #0A1430; color: #fff; border: 0; border-radius: 14px; padding: 10px 16px 10px 10px; max-width: 520px;
  font-weight: 600; box-shadow: 0 24px 50px -12px rgba(10,20,48,.4); transform: translateY(calc(100% + 40px)); transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .2s; opacity: 0; }
[data-theme="light"] .toast.show { transform: none; opacity: 1; }
[data-theme="light"] .toast-success .toast-ikona { color: #3EE0CF; }
[data-theme="light"] .toast-info .toast-ikona { color: #9DB0FF; }
[data-theme="light"] .toast-error .toast-ikona, [data-theme="light"] .toast-warning .toast-ikona { color: #FDBA74; }
@media (max-width: 699px) {
  [data-theme="light"] #toasts { left: 12px !important; right: 12px !important; transform: none; width: auto; }
  [data-theme="light"] .toast { max-width: none; width: 100%; box-sizing: border-box; }
}
@media (prefers-reduced-motion: reduce) { [data-theme="light"] .toast { transition: opacity .2s; transform: none; } }

.sg-partner-celija { display: flex; align-items: center; gap: 12px; }

/* Pretraga po PIB-u (naša evidencija) i katalog ranije slatih artikala — 17.11.2026 */
.sg-pib-cip { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--bg-elevated); color: var(--text-muted); }
.sg-pib-cip.nadjen { background: #E3F6EC; color: #0F7A4A; }
.sg-pib-cip.upoz { background: #FFF3DC; color: #A45A00; }
.sg-pib-cip.nije { background: #EEF1F6; color: #475569; }
.sg-kupac-novi { border-style: dashed; }
.sg-kupac-plus { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-50, #EEF2FF); color: var(--primary, #3355FF);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sg-katalog { margin-bottom: 14px; }
.sg-katalog-polje { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: 11px; background: var(--bg-card); color: var(--text-faint); }
.sg-katalog-polje input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); }
.sg-katalog-polje:focus-within { border-color: var(--primary); box-shadow: var(--halo); }
.sg-katalog-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sg-katalog-red { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.sg-katalog-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-katalog-tekst strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-katalog-tekst .mono { font-size: 12px; color: var(--text-faint); }
.sg-katalog-prazno { font-size: 13.5px; color: var(--text-muted); padding: 6px 2px; }

.sg-eta { color: var(--primary-hover, #2441E0); font-weight: 600; }

/* Podešavanja „Signal" (README „Partneri, Podešavanja"): kartice u 2 kolone, tim preko cele širine. */
.sg-set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.sg-set-grid > .detail-card { margin: 0 !important; max-width: none !important; }
.sg-set-kartica { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.sg-set-siroka { grid-column: 1 / -1; }
.sg-set-glava { display: flex; gap: 12px; align-items: flex-start; }
.sg-set-ikona { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-50, #EEF2FF); color: var(--primary, #3355FF);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sg-set-naslov { font-size: 17px; font-weight: 700; margin: 0; }
.sg-set-pod { margin: 2px 0 0; font-size: 13.5px; color: var(--text-muted); }
.sg-set-status { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; }
.sg-set-status i { font-size: 24px; }
.sg-set-status div { display: flex; flex-direction: column; }
.sg-set-status strong { font-size: 15px; }
.sg-set-status span { font-size: 13px; opacity: .85; }
.sg-set-status.radi { background: #E3F6EC; color: #0F7A4A; }
.sg-set-status.greska { background: #FDE7E6; color: #B42318; }
.sg-set-status.nije { background: #FFF3DC; color: #A45A00; }
.sg-set-podaci { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.sg-set-podaci div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.sg-set-podaci dt { font-size: 12px; color: var(--text-faint); }
.sg-set-podaci dd { margin: 2px 0 0; font-weight: 600; }
.sg-set-pomoc { font-size: 12.5px; color: var(--text-faint); margin: 6px 0 0; }
.sg-set-dugmad { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sg-tim-kolone { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.sg-tim-podnaslov { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.sg-tim-red { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.sg-tim-red:first-of-type { border-top: 0; }
.sg-tim-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-tim-tekst strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-tim-tekst span { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-tim-stanje { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.sg-tim-stanje.neaktivan { color: #B42318; }
.sg-tim-uredjaj { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-muted); flex-shrink: 0; }
.sg-tim-red .sg-avatar { width: 36px; height: 36px; font-size: 13px; flex-shrink: 0; }
@media (max-width: 1100px) { .sg-set-grid, .sg-tim-kolone { grid-template-columns: 1fr; } }

/* Alarm vendoru: firma koristi tuđ CIP ključ (zaštita licence, 17.11.2026) */
.sg-alarm { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px;
  background: #FDE7E6; border: 1px solid #F5C2BD; color: #B42318; }
.sg-alarm > i { font-size: 24px; flex-shrink: 0; }
.sg-alarm strong { display: block; font-size: 15px; }
.sg-alarm-red { font-size: 13.5px; margin-top: 4px; color: #7A1D15; }

/* Samostalne registracije na čekanju (ekran Firme, 17.11.2026) */
.sg-alarm-info { background: #EEF2FF !important; border-color: #C7D2FE !important; color: #2441E0 !important; }
.sg-alarm-info .sg-alarm-red { color: #1E2A6B; }
.sg-reg-red { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sg-reg-dugmad { display: inline-flex; gap: 6px; }

/* Izbor objekta (objekti.js) — 17.11.2026 */
.sg-objekat-dugme { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #C9D2E6; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.sg-objekat-dugme span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-objekat-dugme:hover { background: rgba(255,255,255,.1); color: #fff; }
.ob-lista { display: flex; flex-direction: column; gap: 8px; }
.ob-izbor { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.ob-izbor.aktivan { border: 2px solid var(--primary, #3355FF); padding: 11px 13px; }
.ob-izbor-ikona { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-50, #EEF2FF); color: var(--primary, #3355FF);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ob-izbor-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ob-izbor-tekst span { font-size: 12.5px; color: var(--text-muted); }
.ob-izbor-kvacica { color: var(--primary, #3355FF); font-size: 20px; }
.ob-izbor-cek input { width: 18px; height: 18px; flex-shrink: 0; }
.ob-pomoc { font-size: 13.5px; color: var(--text-muted); margin: 0 0 12px; }
.ob-baner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 12px; border-radius: 12px;
  background: #FFF3DC; color: #A45A00; font-size: 14px; border: 1px solid #FCE3B0; }
.ob-baner span { flex: 1; }
.ob-baner.aktivan { background: #EEF2FF; color: #2441E0; border-color: #C7D2FE; }
.ob-razvrstaj { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: #FFF3DC; border: 1px solid #FCE3B0; color: #6B3A00;
  display: flex; flex-direction: column; gap: 8px; }
.ob-razvrstaj-naslov { font-weight: 700; display: flex; align-items: center; gap: 6px; color: #A45A00; }
.ob-razvrstaj-adresa { font-size: 13px; }
.ob-razvrstaj-red { display: flex; gap: 8px; }
.ob-razvrstaj-red select { flex: 1; min-width: 0; }
.ob-razvrstaj-zapamti { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.ob-pripada { margin: 10px 0; font-size: 13.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.sg-tim-objekti { font-size: 12.5px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* Šifarnik artikala (artikli.js, 18.11.2026) */
.ar-alati { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-filteri { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ar-filteri .input[type=search] { flex: 1; min-width: 220px; max-width: 420px; }
.ar-filteri select { width: auto; }
.ar-strane { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.ar-tabela tr.je-neaktivan td { opacity: .55; }
.ar-pomoc { font-size: 12.5px; color: var(--text-muted); margin: 4px 0 0; display: block; line-height: 1.5; }
.ar-akciza > div { padding-left: 0 !important; margin-top: 0 !important; }
.ar-dob-red { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.ar-dob-red:first-of-type { border-top: 0; }
.ar-dob-red > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.ar-dob-red .mono { font-size: 12px; color: var(--text-muted); }
.ar-uvoz-dugmad { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.ar-uvoz-dugmad label.btn { cursor: pointer; }
.ar-greske { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #FFF3DC; color: #7A4300; font-size: 13px; }
.ar-greske ul { margin: 6px 0 0; padding-left: 18px; }
.ar-rezultat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ar-rezultat div { background: var(--bg); border-radius: 12px; padding: 12px; text-align: center; display: flex; flex-direction: column; }
.ar-rezultat strong { font-size: 24px; font-weight: 800; }
.ar-rezultat span { font-size: 12.5px; color: var(--text-muted); }
.ar-rezultat .greska strong { color: #B42318; }
.ar-kartica { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; font: inherit; color: inherit; cursor: pointer; }
.ar-kartica.neaktivan { opacity: .6; }
.ar-kartica-red { display: flex; justify-content: space-between; gap: 10px; font-size: 15.5px; }
.ar-jm { color: var(--text-muted); font-size: 13.5px; white-space: nowrap; }
.ar-sifra { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-oznake { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ar-izbor { max-width: 520px; width: calc(100% - 32px); text-align: left; }
.ar-izbor h3 { text-align: left; }
.ar-izbor p { font-size: 14px; }
.ar-izbor-lista { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; margin: 12px 0; }
.ar-izbor-stavka { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--border-strong, #D5DBE8);
  border-radius: 12px; background: var(--bg-card, #fff); font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.ar-izbor-stavka:hover, .ar-izbor-stavka:focus { border-color: var(--primary, #3355FF); outline: none; box-shadow: 0 0 0 3px rgba(51,85,255,.15); }
.ar-izbor-stavka .mono { font-size: 12px; color: var(--text-muted); }
@media (max-width: 699px) {
  .ar-alati { width: 100%; }
  .ar-alati .btn { flex: 1 1 auto; }
  .ar-rezultat { grid-template-columns: repeat(2, 1fr); }
  .ar-izbor-sloj { align-items: flex-end !important; }
  .ar-izbor { width: 100%; max-width: none; border-radius: 20px 20px 0 0 !important; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Artikli sa dolazne → šifarnik (18.11.2026) */
.ar-veze-traka { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.ar-veze-dugme { white-space: nowrap; }
.ar-veze-uspeh { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%;
  padding: 12px 14px; border-radius: 14px; background: #FFF3DC; color: #A45A00; font-weight: 600; font-size: 14px; box-sizing: border-box; }
.ar-veze-uspeh.tamno { background: rgba(250,204,21,.12); color: #FDE68A; border: 1px solid rgba(250,204,21,.25); }
.ar-veze-uspeh span { display: inline-flex; align-items: center; gap: 8px; }
.m-uspeh .ar-veze-uspeh { margin-top: 18px; }
.ar-veze-modal { max-width: 560px; }
.ar-veze-dob { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 14px; }
.ar-veze-dob strong { font-size: 16px; }
.ar-veze-dob .mono { font-size: 12.5px; color: var(--text-muted); }
.ar-veze-naslov { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin: 14px 0 6px; }
.ar-veze-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ar-veze-izbor { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font: inherit; cursor: pointer; }
.ar-veze-izbor.izabran { border: 2px solid var(--primary, #3355FF); padding: 9px 11px; background: var(--primary-50, #EEF2FF); }
.ar-veze-krug { font-size: 20px; color: var(--primary, #3355FF); flex-shrink: 0; }
.ar-veze-tekst { display: flex; flex-direction: column; min-width: 0; }
.ar-veze-tekst strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-veze-tekst .mono { font-size: 12px; color: var(--text-muted); }
.ar-veze-nov-dugme { width: 100%; margin-top: 14px; justify-content: flex-start; border: 1px dashed var(--border-strong); }
.ar-veze-nov-dugme.izabran { border: 2px solid var(--primary, #3355FF); background: var(--primary-50, #EEF2FF); }
.ar-veze-novi { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); }
.ar-veze-dugmad { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.m-veze-dugme { width: 100%; justify-content: center; margin-top: 6px; }

/* Pošiljalac dolazne koga nema u šifarniku — pitanje da li da se doda (18.11.2026) */
.sg-sifarnik-baner {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px;
}
.sg-sifarnik-baner > i { font-size: 22px; color: var(--primary, #3355FF); flex-shrink: 0; margin-top: 1px; }
.sg-sifarnik-tekst { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sg-sifarnik-tekst span { color: var(--text-muted); }
.sg-sifarnik-dugmad { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* QR za vozača (18.11.2026) — slika što veća, na belom, da je vozač lako slika sa ekrana. */
.qr-vozac-modal { max-width: 560px; }
.qr-vozac-telo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-vozac-telo img {
  display: block; width: 100%; height: auto; max-height: calc(90vh - 180px); object-fit: contain;
  background: #fff; border-radius: 12px;
}
.qr-vozac-uputstvo { margin: 0; color: var(--text-muted); font-size: 14px; text-align: center; }
@media (max-width: 700px) {
  .qr-vozac-overlay { padding: 0; }
  .qr-vozac-modal { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .qr-vozac-telo { padding: 12px; justify-content: center; }
  .qr-vozac-telo img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
}

/* Štampa QR-a za vozača: na papir ide samo slika (QR + natpis), ~9 cm široka, gore na sredini. */
@media print {
  @page { margin: 12mm; }
  body.qr-stampa * { visibility: hidden !important; }
  body.qr-stampa .qr-vozac-telo img,
  body.qr-stampa .qr-vozac-telo img * { visibility: visible !important; }
  body.qr-stampa .qr-vozac-telo img {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 90mm !important; max-width: 100%; max-height: none !important; border-radius: 0;
  }
  body.qr-stampa .modal-overlay { background: none !important; backdrop-filter: none !important; }
}

/* Predlozi artikala ispod polja „Naziv artikla" u stavkama (18.11.2026). */
.sg-np {
  position: fixed; z-index: 300; max-height: 280px; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 4px;
}
.sg-np-red { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sg-np-red strong { font-size: 14px; font-weight: 600; color: var(--text); }
.sg-np-red span { font-size: 12px; color: var(--text-muted); }
.sg-np-red:hover, .sg-np-red.aktivan { background: var(--bg-elevated); }
