/* ==========================================================================
   e-Popis Pro — dizajn sistem
   Tokeni (boje, razmaci, senke) + nadogradnja DeskApp/Bootstrap 4 komponenti.
   Tamna tema: <html data-theme="dark">
   ========================================================================== */

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --border: #e4e8ef;
  --border-strong: #d3dae5;

  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --subtle: #94a3b8;

  --primary: #3b5bdb;
  --primary-hover: #3049c0;
  --primary-soft: #eef2ff;
  --primary-text: #3b5bdb;
  --on-primary: #ffffff;
  --ring: rgba(59, 91, 219, .22);

  --success: #0f9f6e;
  --success-soft: #e6f7f0;
  --warning: #c77700;
  --warning-solid: #f59f00;
  --warning-soft: #fff5e1;
  --danger: #d92d2d;
  --danger-soft: #fdecec;
  --info: #0a74b5;
  --info-soft: #e5f3fb;
  --neutral-soft: #eef1f5;

  --sidebar-bg: #0f172a;
  --sidebar-text: #c3cbd8;
  --sidebar-muted: #6b7a93;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active-bg: rgba(99, 132, 255, .16);
  --sidebar-active-text: #ffffff;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow: 0 6px 20px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, .14);

  --sidebar-w: 264px;
  --header-h: 64px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #121a2c;
  --surface-2: #162036;
  --surface-3: #1c2740;
  --border: #243150;
  --border-strong: #2f3e60;

  --text: #e7ecf6;
  --text-2: #c3cddd;
  --muted: #8d9ab3;
  --subtle: #66748f;

  --primary: #6d8cff;
  --primary-hover: #87a0ff;
  --primary-soft: rgba(109, 140, 255, .14);
  --primary-text: #9db1ff;
  --on-primary: #0b1020;
  --ring: rgba(109, 140, 255, .3);

  --success: #3ccf98;
  --success-soft: rgba(60, 207, 152, .13);
  --warning: #f5b544;
  --warning-solid: #f5b544;
  --warning-soft: rgba(245, 181, 68, .13);
  --danger: #ff7b7b;
  --danger-soft: rgba(255, 123, 123, .13);
  --info: #4cc3f7;
  --info-soft: rgba(76, 195, 247, .13);
  --neutral-soft: rgba(148, 163, 184, .12);

  --sidebar-bg: #090d19;
  --sidebar-text: #b3bdd0;
  --sidebar-muted: #5d6b86;
  --sidebar-hover: rgba(255, 255, 255, .05);
  --sidebar-active-bg: rgba(109, 140, 255, .18);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
  --shadow: 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- Osnova ---------- */
html, body { background: var(--bg) !important; }
body {
  font-family: var(--font);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--text); font-family: var(--font); letter-spacing: -.01em; }
a { color: var(--primary-text); transition: color .15s ease; }
a:hover { color: var(--primary-hover); }
p { color: var(--text-2); }
hr, .dropdown-divider { border-color: var(--border); }
::selection { background: var(--ring); }
.pre-loader { display: none !important; }

.text-muted { color: var(--muted) !important; }
.text-dark, .text-black { color: var(--text) !important; }
.text-blue, .text-primary { color: var(--primary-text) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.bg-white { background: var(--surface) !important; }
.bg-light { background: var(--surface-2) !important; }
.border, .border-top, .border-bottom, .border-left, .border-right { border-color: var(--border) !important; }
.font-mono, .mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-feature-settings: normal; }
.tabular { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--primary) !important; outline-offset: 2px; }

/* Skrolbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid var(--bg); }

/* ---------- Bočni meni ---------- */
.left-side-bar {
  width: var(--sidebar-w) !important;
  background: var(--sidebar-bg) !important;
  border-right: 1px solid rgba(255, 255, 255, .04);
  box-shadow: none !important;
}
.left-side-bar .brand-logo {
  width: 100% !important;
  height: var(--header-h) !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
  padding: 0 18px !important;
  display: flex; align-items: center; justify-content: space-between;
  max-width: none;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none !important; padding: 0 !important; line-height: 1.2 !important; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #5b7cfa 0%, #3b5bdb 60%, #2b3fa8 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 6px 16px rgba(59, 91, 219, .35), inset 0 1px 0 rgba(255,255,255,.25);
  flex-shrink: 0;
}
.brand-name { color: #fff; font-weight: 750; font-size: 16px !important; letter-spacing: -.01em; white-space: nowrap; line-height: 1.2 !important; }
.brand-sub { white-space: nowrap; line-height: 1.3 !important; }
.left-side-bar .brand-logo a { width: auto !important; font-size: 14px !important; height: auto !important; }
.brand-name span { color: #8ea6ff; font-weight: 600; display: inline !important; }
.brand-sub { color: var(--sidebar-muted); font-size: 11px; font-weight: 500; margin-top: 1px; }
.left-side-bar .close-sidebar { color: var(--sidebar-text); top: 22px; right: 16px; }

.left-side-bar .menu-block { height: calc(100vh - var(--header-h) - 64px) !important; padding: 10px 0 !important; }
.sidebar-menu > ul > li { padding: 1px 12px !important; }
.sidebar-menu .dropdown-toggle {
  color: var(--sidebar-text) !important;
  padding: 9px 12px 9px 44px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  border-radius: var(--radius-sm) !important;
  line-height: 1.4;
}
.sidebar-menu .dropdown-toggle .micon {
  color: var(--sidebar-muted) !important;
  font-size: 17px !important;
  width: 32px !important; height: 32px !important;
  left: 8px !important;
}
.sidebar-menu .dropdown-toggle:after { color: var(--sidebar-muted) !important; font-size: 11px; right: 14px !important; }
.sidebar-menu .dropdown-toggle:hover,
.sidebar-menu .show > .dropdown-toggle { background: var(--sidebar-hover) !important; color: #fff !important; }
.sidebar-menu .dropdown-toggle:hover .micon,
.sidebar-menu .show > .dropdown-toggle .micon { color: #fff !important; }
.sidebar-menu > ul > li > .dropdown-toggle.active {
  background: var(--sidebar-active-bg) !important; color: var(--sidebar-active-text) !important;
  box-shadow: inset 2px 0 0 #7d97ff;
}
.sidebar-menu > ul > li > .dropdown-toggle.active .micon { color: #9db1ff !important; }
.sidebar-menu .submenu { background: transparent !important; padding: 2px 0 6px !important; }
.sidebar-menu .submenu li a {
  color: var(--sidebar-text) !important;
  padding: 7px 12px 7px 44px !important;
  font-size: 13px !important; border-radius: var(--radius-sm) !important;
  opacity: .85;
}
.sidebar-menu .submenu li a:before { display: none !important; }
.sidebar-menu .submenu li a:hover { background: var(--sidebar-hover) !important; opacity: 1; color: #fff !important; }
.sidebar-menu .submenu li a.active { color: #fff !important; background: var(--sidebar-active-bg) !important; opacity: 1; }
.sidebar-menu .submenu li a i { margin-right: 6px; opacity: .8; }
.sidebar-small-cap {
  color: var(--sidebar-muted) !important; font-size: 10.5px !important; letter-spacing: .09em !important;
  font-weight: 650 !important; padding: 16px 14px 6px !important;
}
.sidebar-menu .dropdown-divider { border-color: rgba(255,255,255,.06); margin: 8px 0; }
.nav-badge {
  margin-left: auto; background: rgba(125, 151, 255, .18); color: #b9c8ff;
  font-size: 10.5px; font-weight: 700; border-radius: 20px; padding: 1px 8px; float: right; margin-top: 1px;
}
.sidebar-foot {
  position: absolute; bottom: 0; left: 0; right: 0; height: 64px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--sidebar-text); font-size: 12px;
}
.sidebar-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ccf98; box-shadow: 0 0 0 3px rgba(60,207,152,.18); }
.sidebar-foot.offline .dot { background: #f5b544; box-shadow: 0 0 0 3px rgba(245,181,68,.2); }

/* ---------- Gornja traka ---------- */
.header {
  position: fixed !important;
  top: 0; right: 0;
  height: var(--header-h) !important;
  width: calc(100% - var(--sidebar-w)) !important;
  background: color-mix(in srgb, var(--surface) 86%, transparent) !important;
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  padding: 0 20px;
  align-items: center;
}
.header .header-left { width: auto !important; flex: 1; gap: 14px; display: flex; align-items: center; min-width: 0; }
.header .header-right { display: flex; align-items: center; gap: 6px; padding-right: 0 !important; width: auto !important; flex: 0 0 auto; justify-content: flex-end; }
.header .menu-icon {
  font-size: 22px; color: var(--text-2); cursor: pointer; padding: 0 !important;
  width: 38px; height: 38px; border-radius: var(--radius-sm); align-items: center; justify-content: center;
}
.header .menu-icon:hover { background: var(--surface-3); }

.global-search { position: relative; flex: 1; max-width: 460px; }
.global-search input {
  width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); padding: 0 70px 0 38px; font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.global-search input::placeholder { color: var(--subtle); }
.global-search input:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.global-search > .bi-search { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--subtle); font-size: 14px; }
.global-search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-size: 11px; border-radius: 6px; padding: 2px 6px; font-family: var(--font); box-shadow: none;
}
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 2000;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  max-height: 420px; overflow: auto; display: none; padding: 6px;
}
.search-results.open { display: block; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--text) !important; }
.search-item:hover, .search-item.active { background: var(--surface-3); }
.search-item .si-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-item .si-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.search-item .si-meta { color: var(--muted); font-size: 12px; }
.search-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent;
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  cursor: pointer; transition: background .15s, color .15s; position: relative;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .count {
  position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--surface);
}
[data-theme="dark"] .theme-light-icon { display: none; }
[data-theme="light"] .theme-dark-icon, html:not([data-theme]) .theme-dark-icon { display: none; }

.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px;
  color: var(--text) !important; cursor: pointer; margin-left: 4px;
}
.user-chip:hover { background: var(--surface-3); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6d8cff, #3b5bdb);
  color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  letter-spacing: .02em;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.user-chip .uc-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-chip .uc-role { color: var(--muted); font-size: 11.5px; }
.org-name { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Glavni sadržaj ---------- */
.main-container { padding: calc(var(--header-h) + 24px) 28px 24px calc(var(--sidebar-w) + 28px) !important; min-height: 100vh; }
.main-container .pd-ltr-20 { padding: 0 !important; }
.xs-pd-20-10 { padding: 0 !important; }
.main-container > .pd-ltr-20, .main-container > div { max-width: 1480px; margin: 0 auto; }
.min-height-200px { min-height: 0; }

@media (min-width: 1100px) and (max-width: 1300px) {
  .left-side-bar { left: 0 !important; }
  .header { width: calc(100% - var(--sidebar-w)) !important; }
  .main-container { padding-left: calc(var(--sidebar-w) + 24px) !important; padding-right: 24px !important; }
  .header .menu-icon { display: none !important; }
}
@media (max-width: 1099.98px) {
  .header { width: 100% !important; padding: 0 12px; }
  .main-container { padding: calc(var(--header-h) + 16px) 16px 16px 16px !important; }
  .left-side-bar { left: calc(-1 * var(--sidebar-w) - 2px) !important; }
  .left-side-bar.open { left: 0 !important; box-shadow: var(--shadow-lg) !important; }
  .header .menu-icon { display: flex !important; }
  .org-name, .user-chip .uc-text { display: none; }
}
@media (max-width: 575.98px) {
  .global-search kbd { display: none; }
  .global-search input { padding-right: 12px; }
}

/* Zaglavlje stranice */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.page-crumbs a { color: var(--muted); }
.page-crumbs a:hover { color: var(--primary-text); }
.page-crumbs .bi-chevron-right { font-size: 10px; opacity: .6; }
.page-title { font-size: 24px !important; font-weight: 750 !important; margin: 0 !important; letter-spacing: -.02em !important; line-height: 1.25; }
.page-subtitle { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stare naslovne trake (DeskApp) usklađene sa novim izgledom */
.main-container .title.pb-20 { padding-bottom: 18px !important; }
.main-container .title h2, .main-container .title h4, .main-container .title .h3 {
  font-size: 22px !important; font-weight: 750 !important; letter-spacing: -.02em !important; text-transform: none; color: var(--text);
}
.page-header {
  background: transparent !important; box-shadow: none !important; padding: 0 !important; margin-bottom: 20px !important; border-radius: 0;
}
.breadcrumb { background: transparent !important; padding: 0 !important; margin: 4px 0 0 !important; font-size: 12.5px; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted) !important; }
.breadcrumb-item.active { color: var(--text-2) !important; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--subtle); }

/* ---------- Kartice ---------- */
.card-box, .card, .scanner-card, .feature-card, .stat-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-xs) !important;
  color: var(--text);
}
.card-box.pd-20, .pd-20.card-box { padding: 22px !important; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); }
.card-footer { background: var(--surface-2); border-top: 1px solid var(--border); }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 15px !important; font-weight: 700 !important; margin-top: 0 !important; display: flex; align-items: center; gap: 9px; color: var(--text) !important; }
.card-title .bi { color: var(--muted); font-size: 16px; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin: 0 0 12px; }
.footer-wrap { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 18px 0 0 !important; color: var(--subtle) !important; font-size: 12.5px; }
.footer-wrap strong { color: var(--muted); }

/* ---------- KPI pločice ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; position: relative; overflow: hidden; box-shadow: var(--shadow-xs);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 760; letter-spacing: -.025em; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 3px; }
.kpi-foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.soft-icon {
  width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary-text);
}
.soft-icon.lg { width: 46px; height: 46px; font-size: 20px; border-radius: 13px; }
.soft-icon.success, .tone-success { background: var(--success-soft); color: var(--success); }
.soft-icon.warning, .tone-warning { background: var(--warning-soft); color: var(--warning); }
.soft-icon.danger, .tone-danger { background: var(--danger-soft); color: var(--danger); }
.soft-icon.info, .tone-info { background: var(--info-soft); color: var(--info); }
.soft-icon.neutral { background: var(--neutral-soft); color: var(--text-2); }

/* Brze akcije */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.quick-action {
  display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text) !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.quick-action:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-action .qa-title { font-weight: 650; font-size: 13.5px; line-height: 1.3; }
.quick-action .qa-sub { color: var(--muted); font-size: 12px; }
.quick-action .bi-arrow-right { margin-left: auto; color: var(--subtle); transition: transform .15s, color .15s; }
.quick-action:hover .bi-arrow-right { transform: translateX(3px); color: var(--primary-text); }

/* Hero traka (pozdrav) */
.hero {
  border-radius: calc(var(--radius) + 2px); padding: 22px 24px; margin-bottom: 20px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(1200px 300px at 100% -40%, rgba(255,255,255,.18), transparent 60%),
              linear-gradient(120deg, #2b3fa8 0%, #3b5bdb 45%, #5b7cfa 100%);
  box-shadow: 0 14px 34px rgba(59, 91, 219, .25);
}
[data-theme="dark"] .hero { background: radial-gradient(1000px 300px at 100% -40%, rgba(109,140,255,.28), transparent 60%), linear-gradient(120deg, #18234a 0%, #1f2f6b 55%, #2a3f8f 100%); box-shadow: none; border: 1px solid var(--border); }
.hero h1, .hero h2, .hero h3 { color: #fff !important; }
.hero p { color: rgba(255,255,255,.8); margin: 0; }
.hero .hero-title { font-size: 22px; font-weight: 760; letter-spacing: -.02em; margin: 0 0 4px; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-pill { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 30px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Dugmad ---------- */
.btn {
  font-family: var(--font); font-weight: 600; border-radius: var(--radius-sm) !important; font-size: 13.5px;
  padding: 8px 15px; line-height: 1.4; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-shadow: none;
  letter-spacing: 0; text-transform: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus, .btn.focus { box-shadow: 0 0 0 4px var(--ring) !important; }
.btn-block { display: flex; }
.btn-lg { padding: 11px 20px; font-size: 15px; border-radius: 11px !important; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px !important; gap: 5px; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px !important; }
.btn-primary { background: var(--primary) !important; border-color: var(--primary) !important; color: var(--on-primary) !important; box-shadow: 0 1px 2px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; }
.btn-success { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
[data-theme="dark"] .btn-success { color: #06281c !important; }
.btn-success:hover { filter: brightness(.94); }
.btn-danger { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }
.btn-warning { background: var(--warning-solid) !important; border-color: var(--warning-solid) !important; color: #2b1d00 !important; }
.btn-info { background: var(--info) !important; border-color: var(--info) !important; color: #fff !important; }
.btn-secondary, .btn-light, .btn-default {
  background: var(--surface) !important; border: 1px solid var(--border-strong) !important; color: var(--text) !important; box-shadow: var(--shadow-xs);
}
.btn-secondary:hover, .btn-light:hover, .btn-default:hover { background: var(--surface-3) !important; }
.btn-dark { background: var(--text) !important; border-color: var(--text) !important; color: var(--surface) !important; }
.btn-outline-primary { color: var(--primary-text) !important; border-color: color-mix(in srgb, var(--primary) 40%, var(--border)) !important; background: transparent !important; }
.btn-outline-primary:hover { background: var(--primary-soft) !important; }
.btn-outline-success { color: var(--success) !important; border-color: color-mix(in srgb, var(--success) 40%, var(--border)) !important; background: transparent !important; }
.btn-outline-success:hover { background: var(--success-soft) !important; }
.btn-outline-danger { color: var(--danger) !important; border-color: color-mix(in srgb, var(--danger) 40%, var(--border)) !important; background: transparent !important; }
.btn-outline-danger:hover { background: var(--danger-soft) !important; }
.btn-outline-warning { color: var(--warning) !important; border-color: color-mix(in srgb, var(--warning) 40%, var(--border)) !important; background: transparent !important; }
.btn-outline-warning:hover { background: var(--warning-soft) !important; }
.btn-outline-secondary, .btn-outline-dark, .btn-outline-info { color: var(--text-2) !important; border-color: var(--border-strong) !important; background: transparent !important; }
.btn-outline-secondary:hover, .btn-outline-dark:hover, .btn-outline-info:hover { background: var(--surface-3) !important; }
.btn-ghost { background: transparent; border: 0; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-link { color: var(--primary-text); }
.btn i, .btn .bi { font-size: 1.05em; line-height: 1; }

/* ---------- Forme ---------- */
label, .col-form-label { color: var(--text-2); font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.form-control, .custom-select, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
  background-color: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  height: 40px; font-size: 14px; box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; min-height: 90px; padding-top: 9px; }
.form-control-sm, .custom-select-sm { height: 34px; font-size: 13px; }
.form-control-lg { height: 48px; font-size: 16px; }
.form-control::placeholder { color: var(--subtle); }
.form-control:focus, .custom-select:focus, .select2-container--focus .select2-selection, .select2-container--open .select2-selection {
  border-color: var(--primary) !important; box-shadow: 0 0 0 4px var(--ring) !important; outline: none;
}
.form-control:disabled, .form-control[readonly] { background-color: var(--surface-2) !important; color: var(--text-2) !important; opacity: 1; }
.custom-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6l4 4 4-4'/%3e%3c/svg%3e") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 14px !important; padding-right: 32px; }
select.form-control { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6l4 4 4-4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 32px; }
.input-group-text { background: var(--surface-2) !important; border: 1px solid var(--border-strong) !important; color: var(--muted) !important; border-radius: var(--radius-sm); }
.input-group > .form-control:not(:last-child) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group > .form-control:not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group-append .btn, .input-group-append .input-group-text { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group-prepend .btn, .input-group-prepend .input-group-text { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group.custom > .custom-select:not(:first-child), .input-group.custom > .form-control:not(:first-child) { border-radius: var(--radius-sm) !important; }
.input-group.custom .input-group-append.custom .input-group-text { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.input-group.custom > .form-control:not(:last-child) { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
.input-group.custom .input-group-text { height: 40px; }
.form-group { margin-bottom: 16px; }
.form-text, small.form-text { color: var(--muted) !important; font-size: 12px; }
.invalid-feedback { color: var(--danger); font-size: 12px; }
.was-validated .form-control:invalid, .form-control.is-invalid { border-color: var(--danger) !important; background-image: none; }
.was-validated .form-control:valid, .form-control.is-valid { border-color: var(--success) !important; background-image: none; }
.custom-file-label { background: var(--surface) !important; border: 1px solid var(--border-strong) !important; color: var(--muted) !important; border-radius: var(--radius-sm) !important; height: 40px; line-height: 1.9; }
.custom-file-label::after { background: var(--surface-3) !important; color: var(--text-2) !important; border-left: 1px solid var(--border-strong) !important; height: 38px; line-height: 1.9; content: "Izaberi" !important; }
.custom-control-label { font-weight: 500; color: var(--text-2); }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--primary) !important; border-color: var(--primary) !important; }

/* Select2 */
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text) !important; line-height: 38px !important; padding-left: 12px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px !important; }
.select2-dropdown { background: var(--surface) !important; border: 1px solid var(--border-strong) !important; border-radius: 10px !important; box-shadow: var(--shadow-lg); overflow: hidden; }
.select2-search__field { background: var(--surface-2) !important; border: 1px solid var(--border) !important; color: var(--text) !important; border-radius: 7px; }
.select2-results__option { color: var(--text); font-size: 13.5px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--primary) !important; color: var(--on-primary) !important; }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--surface-3) !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--primary-soft) !important; color: var(--primary-text) !important; border: 0 !important; border-radius: 6px !important; }

/* Datepicker */
.datepicker { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text) !important; border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; font-family: var(--font) !important; }
.datepicker--cell.-selected-, .datepicker--cell.-selected-.-current- { background: var(--primary) !important; color: #fff !important; }
.datepicker--cell.-current- { color: var(--primary-text) !important; }
.datepicker--cell.-focus- { background: var(--surface-3) !important; }
.datepicker--nav-title, .datepicker--day-name { color: var(--text-2) !important; }
.datepicker--day-name { color: var(--primary-text) !important; }

/* ---------- Tabele ---------- */
.table { color: var(--text); margin-bottom: 0; }
.table thead th, .table th {
  background: var(--surface-2); color: var(--muted) !important; font-size: 11.5px !important; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 650 !important; border-top: 0 !important; border-bottom: 1px solid var(--border) !important; padding: 11px 12px !important; white-space: nowrap;
}
.table td { border-top: 1px solid var(--border) !important; padding: 11px 12px !important; vertical-align: middle !important; font-size: 13.5px; color: var(--text); }
.table-hover tbody tr:hover, table.dataTable tbody tr:hover { background: var(--surface-2) !important; }
.table tbody tr, table.dataTable tbody tr, table.dataTable tbody tr.odd, table.dataTable tbody tr.even { background: transparent !important; }
.table-striped tbody tr:nth-of-type(odd), table.dataTable.stripe tbody tr.odd { background: color-mix(in srgb, var(--surface-2) 70%, transparent) !important; }
table.dataTable tbody tr.selected { background: var(--primary-soft) !important; }
.table-bordered, .table-bordered td, .table-bordered th { border-color: var(--border) !important; }
table.dataTable { border-collapse: collapse !important; margin-top: 8px !important; margin-bottom: 8px !important; }
table.dataTable.no-footer { border-bottom: 1px solid var(--border) !important; }
.table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: auto; }
.table-wrap .table thead th:first-child { border-top-left-radius: 11px; }
.dataTables_wrapper { color: var(--text-2); }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  background: var(--surface) !important; border: 1px solid var(--border-strong) !important; color: var(--text) !important;
  border-radius: 9px !important; height: 36px; padding: 0 12px; margin-left: 8px; box-shadow: none !important;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px var(--ring) !important; outline: none; }
.dataTables_wrapper .dataTables_filter label, .dataTables_wrapper .dataTables_length label, .dataTables_info { color: var(--muted) !important; font-size: 13px !important; font-weight: 500; }
.page-item .page-link { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text-2) !important; border-radius: 8px !important; margin: 0 2px; min-width: 34px; text-align: center; font-weight: 600; font-size: 13px; }
.page-item.active .page-link { background: var(--primary) !important; border-color: var(--primary) !important; color: var(--on-primary) !important; }
.page-item.disabled .page-link { opacity: .5; }
.dt-buttons .btn, .dt-buttons .dt-button {
  background: var(--surface) !important; border: 1px solid var(--border-strong) !important; color: var(--text-2) !important;
  border-radius: 8px !important; font-size: 12.5px !important; padding: 6px 11px !important; margin-right: 6px; box-shadow: none !important;
}
.dt-buttons .btn:hover { background: var(--surface-3) !important; }
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before { background-color: var(--primary) !important; box-shadow: none !important; border: 0 !important; }
.table-plus { font-weight: 600; }
.dropdown-toggle.btn-link { color: var(--muted); }

/* ---------- Bedževi, statusi, čipovi ---------- */
.badge { font-weight: 650; border-radius: 6px; padding: 4px 8px; font-size: 11.5px; letter-spacing: .01em; }
.badge-primary { background: var(--primary-soft) !important; color: var(--primary-text) !important; }
.badge-success { background: var(--success-soft) !important; color: var(--success) !important; }
.badge-danger { background: var(--danger-soft) !important; color: var(--danger) !important; }
.badge-warning { background: var(--warning-soft) !important; color: var(--warning) !important; }
.badge-info { background: var(--info-soft) !important; color: var(--info) !important; }
.badge-secondary, .badge-light, .badge-dark { background: var(--neutral-soft) !important; color: var(--text-2) !important; }
.badge.text-white { color: inherit !important; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.status:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: all .15s; user-select: none;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 45%, transparent); color: var(--primary-text); }

/* ---------- Upozorenja ---------- */
.alert { border-radius: 12px !important; border: 1px solid transparent !important; font-size: 13.5px; padding: 12px 40px 12px 14px; display: block; }
.alert-success { background: var(--success-soft) !important; color: var(--success) !important; border-color: color-mix(in srgb, var(--success) 25%, transparent) !important; }
.alert-danger { background: var(--danger-soft) !important; color: var(--danger) !important; border-color: color-mix(in srgb, var(--danger) 25%, transparent) !important; }
.alert-warning { background: var(--warning-soft) !important; color: var(--warning) !important; border-color: color-mix(in srgb, var(--warning) 25%, transparent) !important; }
.alert-info, .alert-primary { background: var(--info-soft) !important; color: var(--info) !important; border-color: color-mix(in srgb, var(--info) 25%, transparent) !important; }
.alert strong { color: inherit; }
.alert .close, .alert a.close { color: inherit !important; opacity: .6; text-shadow: none; padding: 10px 14px; font-weight: 400; }
.alert .close:hover { opacity: 1; }

/* Toast obaveštenja */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 5000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.app-toast {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 12px 14px; display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; animation: toastIn .25s ease-out;
}
.app-toast .bi { font-size: 18px; margin-top: 1px; }
.app-toast.success .bi { color: var(--success); }
.app-toast.danger .bi { color: var(--danger); }
.app-toast.warning .bi { color: var(--warning); }
.app-toast.info .bi { color: var(--info); }
.app-toast .t-close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 0 0 6px; }
.app-toast.hide { animation: toastOut .2s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Modal, dropdown, tabovi ---------- */
.modal-content { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 16px !important; box-shadow: var(--shadow-lg); color: var(--text); }
.modal-header, .modal-footer { border-color: var(--border) !important; }
.modal-title { font-weight: 700; font-size: 16px; }
.modal-backdrop.show { opacity: .5; background: #0b1020; }
.close { color: var(--muted); text-shadow: none; }
.dropdown-menu { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; padding: 6px !important; font-size: 13.5px; }
.dropdown-item { color: var(--text) !important; border-radius: 8px; padding: 8px 10px !important; display: flex !important; align-items: center; gap: 9px; font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3) !important; color: var(--text) !important; }
.dropdown-item i { color: var(--muted); font-size: 15px !important; width: 18px; text-align: center; }
.dropdown-item.text-danger, .dropdown-item.text-danger i { color: var(--danger) !important; }
.dropdown-header { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; }
.dropdown-menu-icon-list .dropdown-item i { position: static !important; }
.nav-tabs { border-bottom: 1px solid var(--border); gap: 4px; }
.nav-tabs .nav-link { border: 0 !important; color: var(--muted) !important; font-weight: 600; font-size: 13.5px; padding: 10px 14px; border-bottom: 2px solid transparent !important; border-radius: 0; background: transparent !important; }
.nav-tabs .nav-link:hover { color: var(--text) !important; }
.nav-tabs .nav-link.active { color: var(--primary-text) !important; border-bottom-color: var(--primary) !important; }
.nav-pills .nav-link { color: var(--text-2); font-weight: 600; border-radius: 9px; }
.nav-pills .nav-link.active { background: var(--primary) !important; color: var(--on-primary) !important; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.seg .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

/* Progres */
.progress { background: var(--surface-3) !important; border-radius: 20px !important; height: 8px; overflow: hidden; box-shadow: none; }
.progress-bar { background: var(--primary); border-radius: 20px; }
.progress-bar.bg-success { background: var(--success) !important; }
.progress-bar.bg-warning { background: var(--warning-solid) !important; }
.progress-bar.bg-danger { background: var(--danger) !important; }

/* Prazna stanja */
.empty-state { text-align: center; padding: 36px 16px; }
.empty-state-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 12px; }
.empty-state-title { font-weight: 700; font-size: 15px; color: var(--text); }
.empty-state-text { color: var(--muted); font-size: 13px; margin-top: 4px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* Lista stavki (aktivnosti, podsetnici) */
.list-rows { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-row .lr-main { min-width: 0; flex: 1; }
.list-row .lr-title { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-meta { color: var(--muted); font-size: 12px; }
.list-row .lr-side { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Vremenska linija (istorija sredstva) */
.timeline { position: relative; padding-left: 26px; }
.timeline:before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; }
.tl-dot.success { border-color: var(--success); } .tl-dot.warning { border-color: var(--warning); } .tl-dot.danger { border-color: var(--danger); } .tl-dot.info { border-color: var(--info); } .tl-dot.secondary { border-color: var(--subtle); }
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-meta { color: var(--muted); font-size: 12px; }
.tl-body { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.diff-row { font-size: 12px; color: var(--muted); }
.diff-row del { color: var(--danger); text-decoration: line-through; opacity: .8; }
.diff-row ins { color: var(--success); text-decoration: none; font-weight: 600; }

/* Mapa prostorija (napredak popisa) */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.room-tile {
  border-radius: 11px; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface-2);
  position: relative; overflow: hidden; color: var(--text) !important; display: block;
}
.room-tile .rt-name { font-weight: 650; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-tile .rt-meta { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; margin-top: 2px; }
.room-tile .rt-bar { height: 4px; background: var(--surface-3); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.room-tile .rt-bar span { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.room-tile.p-0 { }
.room-tile.p-low .rt-bar span { background: var(--danger); }
.room-tile.p-mid .rt-bar span { background: var(--warning-solid); }
.room-tile.p-high .rt-bar span { background: var(--primary); }
.room-tile.p-done { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.room-tile.p-done .rt-bar span { background: var(--success); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span:before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; background: var(--c); vertical-align: -1px; }

/* Definicione liste (detalji sredstva) */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px 20px; }
.dl-item dt { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.dl-item dd { margin: 0; font-weight: 600; font-size: 14px; color: var(--text); word-break: break-word; }

/* Galerija priloga */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.attach { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); position: relative; }
.attach .a-thumb { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); font-size: 32px; overflow: hidden; }
.attach .a-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach .a-body { padding: 8px 10px; }
.attach .a-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.attach .a-meta { font-size: 11px; color: var(--muted); }
.attach .a-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(15,23,42,.65); color: #fff; display: none; align-items: center; justify-content: center; }
.attach:hover .a-del { display: flex; }
.dropzone-lite { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone-lite:hover, .dropzone-lite.drag { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }

/* Koraci (čarobnjak za uvoz) */
.steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.step .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.step.active { color: var(--text); } .step.active .n { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.step.done { color: var(--success); } .step.done .n { background: var(--success-soft); border-color: var(--success); }
.step-sep { width: 28px; height: 1.5px; background: var(--border-strong); align-self: center; }
tr.row-error td { background: var(--danger-soft) !important; }
tr.row-warn td { background: var(--warning-soft) !important; }

/* ---------- Mobilni popis (skener) ---------- */
.scan-shell { max-width: 720px; margin: 0 auto; }
.scan-status-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scan-viewport { position: relative; border-radius: 14px; overflow: hidden; background: #0b1020; min-height: 0; }
.scan-viewport #qr-reader { border: 0 !important; }
.scan-viewport #qr-reader video { border-radius: 14px; }
#qr-reader__dashboard_section_csr button, #qr-reader button { background: var(--primary) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; padding: 6px 12px !important; font-weight: 600 !important; margin: 4px; }
#qr-reader__dashboard_section_swaplink { color: var(--primary-text) !important; }
#qr-reader select { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 8px; padding: 4px 8px; }
#qr-reader { color: var(--text-2) !important; }
.scan-input-wrap { position: relative; }
.scan-input-wrap .form-control { height: 56px; font-size: 18px; font-weight: 600; padding-left: 50px; padding-right: 112px; border-radius: 14px !important; letter-spacing: .02em; }
.scan-input-wrap > .bi { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); z-index: 3; }
.scan-input-wrap .btn { position: absolute; right: 7px; top: 7px; bottom: 7px; border-radius: 10px !important; z-index: 3; }
.scan-result { border-radius: 16px; padding: 18px; border: 1.5px solid var(--border); background: var(--surface); animation: popIn .22s ease-out; }
.scan-result.ok { border-color: var(--success); background: color-mix(in srgb, var(--success-soft) 70%, var(--surface)); }
.scan-result.warn { border-color: var(--warning-solid); background: color-mix(in srgb, var(--warning-soft) 70%, var(--surface)); }
.scan-result.err { border-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface)); }
.scan-result .sr-head { display: flex; align-items: center; gap: 12px; }
.scan-result .sr-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.scan-result.ok .sr-icon { background: var(--success); color: #fff; }
.scan-result.warn .sr-icon { background: var(--warning-solid); color: #2b1d00; }
.scan-result.err .sr-icon { background: var(--danger); color: #fff; }
.scan-result .sr-title { font-weight: 750; font-size: 17px; line-height: 1.25; }
.scan-result .sr-sub { color: var(--text-2); font-size: 13px; }
.scan-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.scan-fact { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.scan-fact .sf-l { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.scan-fact .sf-v { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-touch { min-height: 50px; font-size: 15px !important; border-radius: 12px !important; }
.room-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.queue-pill { background: var(--warning-soft); color: var(--warning); border-radius: 20px; padding: 4px 11px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.flash-ok { animation: flashOk .5s ease-out; }
.flash-err { animation: flashErr .5s ease-out; }
@keyframes flashOk { 0% { box-shadow: 0 0 0 0 rgba(15,159,110,.5); } 100% { box-shadow: 0 0 0 18px rgba(15,159,110,0); } }
@keyframes flashErr { 0% { box-shadow: 0 0 0 0 rgba(217,45,45,.5); } 100% { box-shadow: 0 0 0 18px rgba(217,45,45,0); } }
@keyframes popIn { from { opacity: 0; transform: scale(.98) translateY(6px); } to { opacity: 1; transform: none; } }
.scan-log-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.scan-log-item:last-child { border-bottom: 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.switch { position: relative; width: 40px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 23px; transition: .2s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span:before { transform: translateX(17px); }

/* ---------- Prijava ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 10% 0%, rgba(125,151,255,.35), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(60,207,152,.18), transparent 60%), #0b1226;
}
.auth-aside:after {
  content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 30%, #000 30%, transparent 75%);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { color: #fff; font-size: 34px; font-weight: 780; letter-spacing: -.03em; line-height: 1.15; max-width: 480px; }
.auth-aside p { color: rgba(255,255,255,.72); font-size: 15px; max-width: 460px; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; max-width: 440px; }
.auth-feature .soft-icon { background: rgba(255,255,255,.1); color: #c7d3ff; }
.auth-feature b { color: #fff; display: block; font-size: 14px; }
.auth-feature span { color: rgba(255,255,255,.65); font-size: 13px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 26px; font-weight: 780; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .form-control { height: 46px; }
.pw-wrap { position: relative; }
.pw-wrap .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---------- Štampa ---------- */
@media print {
  .left-side-bar, .header, .toast-stack, .page-head-actions, .no-print, .dt-buttons, .dataTables_filter, .dataTables_length, .dataTables_paginate { display: none !important; }
  .main-container { padding: 0 !important; }
  html, body { background: #fff !important; }
  .card-box, .kpi { box-shadow: none !important; border-color: #ddd !important; }
}

/* Pomoćne klase */
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.min-w-0 { min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right-sidebar { display: none !important; }

/* Hover redova mora da pobedi pozadinu prugastih redova */
.table-hover tbody tr:hover, table.dataTable tbody tr:hover, table.dataTable tbody tr.odd:hover, table.dataTable tbody tr.even:hover { background: var(--surface-3) !important; }

/* Telefon: pretraga zauzima slobodan prostor, kartice činjenica u dve kolone */
.header .header-left { min-width: 0; }
.global-search { min-width: 0; }
@media (max-width: 575.98px) {
  .header { padding: 0 10px; gap: 6px; }
  .header .header-left { gap: 8px; }
  .global-search input { font-size: 14px; padding-left: 34px; }
  .scan-facts { grid-template-columns: 1fr 1fr; }
  .scan-facts .scan-fact:last-child { grid-column: span 2; }
  .page-title { font-size: 21px !important; }
  .card-box.pd-20, .pd-20.card-box { padding: 16px !important; }
  .scan-input-wrap .form-control { font-size: 16px; }
}
.room-tile.p-low { box-shadow: inset 3px 0 0 var(--danger); }
.room-tile.p-mid { box-shadow: inset 3px 0 0 var(--warning-solid); }

/* Logo u bočnom meniju: stari DeskApp stil (.brand-logo a span { display: block }) ne sme da poremeti centriranje */
.left-side-bar .brand-logo a .brand-mark { display: flex !important; align-items: center; justify-content: center; overflow: visible; }
.brand-mark .bi { line-height: 1; display: block; }
.brand-mark .bi::before { vertical-align: 0 !important; display: block; }
.card-title { margin-bottom: 0; }
.card-title.mb-1 { margin-bottom: 4px !important; } .card-title.mb-2 { margin-bottom: 8px !important; } .card-title.mb-3 { margin-bottom: 16px !important; }

/* DataTables: prostor za strelice sortiranja u zaglavlju */
table.dataTable thead th.sorting, table.dataTable thead th.sorting_asc, table.dataTable thead th.sorting_desc { padding-right: 26px !important; position: relative; }
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_desc:after { right: 8px !important; left: auto !important; font-size: 11px; opacity: .25; }
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_desc:after { opacity: .8; color: var(--primary-text); }
