

/* Dokumenti: vidljivo ~10 redova, ostatak skrol */
.docs-table-scroll {
  max-height: 520px; /* ~10 redova + header */
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 0 0 12px 12px;
}
.docs-table-scroll table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0 0.45rem;
  table-layout: fixed;
}
.docs-table-scroll table th:nth-child(1),
.docs-table-scroll table td:nth-child(1) { width: 5.1%; }
.docs-table-scroll table th:nth-child(2),
.docs-table-scroll table td:nth-child(2) { width: 15.3%; }
.docs-table-scroll table th:nth-child(3),
.docs-table-scroll table td:nth-child(3) { width: 12.2%; }
.docs-table-scroll table th:nth-child(4),
.docs-table-scroll table td:nth-child(4) { width: 11.2%; white-space: normal; }
.docs-table-scroll table th:nth-child(5),
.docs-table-scroll table td:nth-child(5) { width: 14.3%; }
.docs-table-scroll table th:nth-child(6),
.docs-table-scroll table td:nth-child(6) { width: 13.2%; }
.docs-table-scroll table th:nth-child(7),
.docs-table-scroll table td:nth-child(7) { width: 21.4%; }
.docs-table-scroll table th:nth-child(8),
.docs-table-scroll table td:nth-child(8) { width: 140px; }
.docs-table-scroll table th:nth-child(9),
.docs-table-scroll table td:nth-child(9) { width: 88px; }
.docs-table-scroll table th:nth-child(10),
.docs-table-scroll table td:nth-child(10) {
  width: 7.3%;
  text-align: center;
}
.docs-table-scroll table th:nth-child(3) .docs-badge {
  white-space: nowrap;
}
.docs-source-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.15;
  white-space: normal;
}
.docs-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2, #1e2430);
  box-shadow: 0 1px 0 var(--border, rgba(255,255,255,.08));
}
.docs-toolbar select {
  max-width: 220px;
}


/* ===== UI Filter panel ===== */
.ui-filter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255,255,255,.12));
  background: var(--surface-2, #1a2030);
  color: var(--text, #e8eef7);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ui-filter-btn:hover { border-color: var(--accent, #61b3c4); }
.ui-filter-btn.is-active {
  border-color: var(--accent, #61b3c4);
  background: rgba(97,179,196,.12);
  color: var(--accent, #61b3c4);
}
.ui-filter-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent, #61b3c4);
  color: #0b1220;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ui-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem;
  backdrop-filter: blur(2px);
}
.ui-filter-panel {
  width: min(420px, 100%);
  max-height: min(80vh, 640px);
  background: var(--surface, #141a24);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ui-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
}
.ui-filter-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.ui-filter-x {
  border: none;
  background: transparent;
  color: var(--muted, #9aa8b8);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ui-filter-x:hover { background: rgba(255,255,255,.06); color: var(--text); }
.ui-filter-body {
  padding: 0.75rem 1rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ui-f-section { display: flex; flex-direction: column; gap: 0.35rem; }
.ui-f-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted, #9aa8b8);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ui-f-hint { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .75; }
.ui-f-search, .ui-f-search-wrap input {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  background: var(--surface-2, #1a2030);
  color: var(--text);
  padding: 0 0.65rem;
  font: inherit;
  font-size: 0.85rem;
}
.ui-f-list {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  padding: 0.25rem;
  background: var(--surface-2, #1a2030);
}
.ui-f-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.ui-f-opt:hover { background: rgba(255,255,255,.05); }
.ui-f-opt input { accent-color: var(--accent, #61b3c4); }
.ui-f-empty { padding: 0.75rem; color: var(--muted); font-size: 0.85rem; text-align: center; }
.ui-filter-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border, rgba(255,255,255,.08));
}
.ui-filter-chips, .ui-filter-chips#docs-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0 0.65rem;
  margin-top: -0.25rem;
}
.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(97,179,196,.14);
  border: 1px solid rgba(97,179,196,.35);
  color: var(--text);
  font-size: 0.75rem;
  max-width: 100%;
}
.ui-chip button {
  border: none;
  background: rgba(0,0,0,.15);
  color: inherit;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.ui-chip button:hover { background: rgba(239,68,68,.35); }
.list-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.list-filter-bar .docs-search { flex: 1; min-width: 0; }
.list-page .section-header {
  padding: 0.9rem 1.1rem;
  background: var(--surface);
}
.list-page .section-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.list-page .list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.list-page .list-filter-bar {
  padding: 0.75rem 1.1rem;
  margin: 0;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.list-page .list-filter-bar .docs-search {
  box-sizing: border-box;
  height: 36px;
  padding: 0 0.7rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.65rem center;
  background-size: 14px 14px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  outline: none;
}
.list-page .list-filter-bar .docs-search:focus {
  border-color: rgba(97,179,196,0.55);
  box-shadow: 0 0 0 2px rgba(97,179,196,0.12);
}
.list-table-wrap {
  max-width: 100%;
  overflow: auto;
  padding: 0 0.65rem 0.65rem;
}
.list-table-wrap table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0 0.35rem;
  table-layout: fixed;
}
.list-table-wrap th:nth-child(1),
.list-table-wrap td:nth-child(1) { width: 18%; }
.list-table-wrap th:nth-child(2),
.list-table-wrap td:nth-child(2) { width: 20%; }
.list-table-wrap th:nth-child(3),
.list-table-wrap td:nth-child(3) { width: 11%; }
.list-table-wrap th:nth-child(4),
.list-table-wrap td:nth-child(4) { width: 17%; }
.list-table-wrap th:nth-child(5),
.list-table-wrap td:nth-child(5) { width: 34%; }
.list-table-wrap th {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}
.list-table-wrap td {
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.88rem;
  vertical-align: middle;
}
.list-table-wrap tbody td:first-child {
  border-left: 3px solid rgba(97,179,196,0.55);
  border-radius: 8px 0 0 8px;
  text-align: center;
  font-weight: 600;
}
.list-table-wrap tbody td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.list-table-wrap tbody tr:hover td { background: rgba(97,179,196,0.08); }
.vehicle-list-page .list-table-wrap th:nth-child(1),
.vehicle-list-page .list-table-wrap td:nth-child(1) { width: 24%; }
.vehicle-list-page .list-table-wrap th:nth-child(2),
.vehicle-list-page .list-table-wrap td:nth-child(2) { width: 23%; }
.vehicle-list-page .list-table-wrap th:nth-child(3),
.vehicle-list-page .list-table-wrap td:nth-child(3) { width: 24%; }
.vehicle-list-page .list-table-wrap th:nth-child(4),
.vehicle-list-page .list-table-wrap td:nth-child(4) { width: 16%; }
.vehicle-list-page .list-table-wrap th:nth-child(5),
.vehicle-list-page .list-table-wrap td:nth-child(5) { width: 13%; }
.vehicle-list-page .list-table-wrap tbody td.vehicle-name-cell {
  text-align: center;
  color: var(--text) !important;
  font-weight: 500;
}
.vehicle-name-with-icon {
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:0.55rem;
  max-width:100%;
  text-align:left;
}
.vehicle-list-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  flex:0 0 28px;
  transform:translateX(-6px);
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--surface-2);
  color:var(--muted);
}
.vehicle-list-icon .docs-ico-svg { width:17px; height:17px; }
.driver-name-with-avatar {
  display:grid;
  grid-template-columns:40px minmax(0, 1fr);
  align-items:center;
  width:min(100%, 200px);
  margin-inline:auto;
}
.driver-name-text {
  min-width:0;
  white-space:nowrap;
  text-align:center;
}
.driver-list-avatar {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:center;
  width:28px;
  height:28px;
  flex:0 0 28px;
  border-radius:50%;
  background:var(--dark-blue);
  color:var(--light-blue);
  font-size:0.68rem;
  font-weight:700;
  text-transform:uppercase;
}
.vehicle-list-page .vehicle-card-number-cell { color:var(--text); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:0.76rem; text-align:center; overflow-wrap:anywhere; }
.vehicle-list-page .list-table-wrap tbody td:nth-child(2),
.vehicle-list-page .list-table-wrap tbody td:nth-child(3),
.vehicle-list-page .list-table-wrap tbody td:nth-child(4) { text-align:center; }
.vehicle-list-page .vehicle-vin-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.vehicle-list-page .vehicle-details-action { text-align: center; }
.vehicle-list-page .list-table-wrap table { min-width: 680px; }
.vehicle-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}
.vehicle-list-layout.has-details {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 280px);
}
.vehicle-list-layout.has-details .list-table-wrap { min-width: 0; padding-right: 0; }
.vehicle-list-layout.has-details .list-table-wrap table { min-width: 660px; }
.vehicle-list-layout:not(.driver-list-layout).has-details .list-table-wrap th:last-child,
.vehicle-list-layout:not(.driver-list-layout).has-details .vehicle-details-action { display:none; }
.driver-list-page .list-table-wrap table { min-width: 640px; }
.driver-list-page .list-table-wrap th:nth-child(1),
.driver-list-page .list-table-wrap td:nth-child(1) { width: 24%; }
.driver-list-page .list-table-wrap th:nth-child(1) {
  text-align:center;
  text-indent:40px;
}
.driver-list-page .list-table-wrap th:nth-child(2),
.driver-list-page .list-table-wrap td:nth-child(2) { width: 25%; }
.driver-list-page .list-table-wrap th:nth-child(3),
.driver-list-page .list-table-wrap td:nth-child(3) { width: 11%; }
.driver-list-page .list-table-wrap th:nth-child(4),
.driver-list-page .list-table-wrap td:nth-child(4) { width: 20%; }
.driver-list-page .list-table-wrap th:nth-child(5),
.driver-list-page .list-table-wrap td:nth-child(5) { width: 20%; }
.driver-list-page .vehicle-details-action { text-align:center; }
.driver-list-page .list-table-wrap tbody td.driver-name-cell,
.driver-list-page .list-table-wrap tbody td:nth-child(2),
.driver-list-page .list-table-wrap tbody td:nth-child(3),
.driver-list-page .list-table-wrap tbody td:nth-child(4) {
  text-align:center;
  color:var(--text) !important;
}
.driver-list-layout.has-details { grid-template-columns:minmax(0, 1fr) 320px; }
.driver-list-layout.has-details .list-table-wrap table { min-width: 660px; }
.driver-list-layout.has-details .list-table-wrap th:nth-child(1),
.driver-list-layout.has-details .list-table-wrap td:nth-child(1) { width: 30%; }
.driver-list-layout.has-details .list-table-wrap th:nth-child(2),
.driver-list-layout.has-details .list-table-wrap td:nth-child(2) { width: 30%; }
.driver-list-layout.has-details .list-table-wrap th:nth-child(3),
.driver-list-layout.has-details .list-table-wrap td:nth-child(3) { width: 12%; }
.driver-list-layout.has-details .list-table-wrap th:nth-child(4),
.driver-list-layout.has-details .list-table-wrap td:nth-child(4) { width: 28%; }
.driver-list-layout.has-details .list-table-wrap th:last-child,
.driver-list-layout.has-details .vehicle-details-action { display:none; }
.driver-details-panel .dd-avatar .driver-list-avatar {
  width:36px;
  height:36px;
  flex-basis:36px;
  font-size:0.8rem;
}
.vehicle-details-panel {
  min-width: 0;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  position: sticky;
  top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.vehicle-details-panel.docs-detail-modern {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(97,179,196,0.08), transparent 120px), var(--surface);
}
.vehicle-details-panel[hidden] { display: none !important; }
.vehicle-detail-modern .dd-head { align-items: flex-start; }
.vehicle-detail-modern .dd-avatar { width:48px; height:48px; border-radius:12px; }
.vehicle-detail-modern .dd-avatar .docs-ico-svg { width:24px; height:24px; }
.vehicle-detail-title { color:var(--text); font-size:1.05rem; font-weight:700; line-height:1.25; overflow-wrap:anywhere; }
.vehicle-detail-body { min-height:0; }
.vehicle-detail-section + .vehicle-detail-section { margin-top:0.65rem; }
.vehicle-detail-section h4 { margin:0 0 0.25rem; color:var(--accent); font-size:0.7rem; font-weight:700; text-transform:uppercase; }
.vehicle-detail-section .vehicle-detail-fields { display:block; }
.vehicle-detail-section .dd-row { grid-template-columns:minmax(100px, 0.9fr) minmax(0, 1.1fr); }
.vehicle-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.vehicle-detail-header-main { display:flex; align-items:center; gap:0.7rem; min-width:0; }
.vehicle-detail-avatar {
  width:42px; height:42px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(97,179,196,0.3); border-radius:10px;
  background:rgba(97,179,196,0.14); color:var(--accent);
}
.vehicle-detail-avatar .docs-ico-svg { width:20px; height:20px; }
.vehicle-detail-header h3 { margin: 0.15rem 0 0; color: var(--text); font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.vehicle-detail-eyebrow { color: var(--muted); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; }
.vehicle-detail-close {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.vehicle-detail-close:hover { color: var(--text); border-color: var(--accent); }
.vehicle-detail-scroll { display: flex; flex-direction: column; gap: 0.55rem; padding: 0.8rem; }
.vehicle-detail-section + .vehicle-detail-section { padding-top: 0.65rem; border-top: 1px solid var(--border); }
.vehicle-detail-section h4 { margin: 0 0 0.45rem; color: var(--text); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.vehicle-detail-fields { display: flex; flex-direction: column; gap: 0; }
.vehicle-detail-fields .vehicle-profile-field {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 0.5rem;
  padding: 0.55rem 0.15rem;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  border-radius: 0;
  background: transparent;
}
.vehicle-detail-fields .vehicle-profile-field:last-child { border-bottom: 0; }
.vehicle-detail-fields .vehicle-profile-field span { line-height: 1.35; }
.vehicle-detail-fields .vehicle-profile-field strong { color: var(--text); text-align: left; line-height: 1.35; }
@media (max-width: 1100px) {
  .vehicle-list-layout.has-details { grid-template-columns: minmax(0, 1fr); }
  .vehicle-details-panel { position: static; max-height: none; }
  .vehicle-details-panel.docs-detail-modern { position:static; max-height:none; }
  .vehicle-list-page .list-table-wrap table { min-width: 760px; }
}
.vehicle-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem;
}
.vehicle-profile-field {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
}
.vehicle-profile-field span { color: var(--muted); font-size: 0.76rem; }
.vehicle-profile-field strong { min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 0.82rem; }
.vehicle-details-empty { color: var(--muted); font-size: 0.82rem; }
.docs-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Filter — mali prozorčić (levak) */
.ui-filter-overlay--popover {
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  align-items: flex-start;
  justify-content: flex-start;
}
.ui-filter-panel--popover {
  width: 320px;
  max-height: min(70vh, 480px);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.06);
  animation: uiFilterIn .14s ease-out;
}
@keyframes uiFilterIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ui-filter-panel--popover .ui-filter-body {
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
}
.ui-filter-panel--popover .ui-f-section {
  gap: 0.3rem;
}
.ui-filter-panel--popover .ui-f-list {
  max-height: 120px;
}
.ui-filter-panel--popover .ui-f-label {
  font-size: 0.7rem;
}
.ui-filter-btn svg {
  display: block;
}
.ui-filter-btn svg,
.vu-filter-btn svg,
.vu-ev-filter-btn svg { color:var(--text); }

/* Filter manji + accordion + drag */
.ui-filter-panel--popover {
  width: 280px !important;
  max-height: min(62vh, 420px);
  border-radius: 11px;
}
.ui-filter-panel--popover .ui-filter-body {
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
}
.ui-filter-panel--popover .ui-f-list {
  max-height: 110px;
}
.ui-filter-drag {
  cursor: grab;
  user-select: none;
}
.ui-filter-drag:active { cursor: grabbing; }
.ui-f-acc {
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2, #1a2030);
}
.ui-f-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.ui-f-acc-head:hover { background: rgba(255,255,255,.04); }
.ui-f-acc-chev {
  display: inline-block;
  transition: transform .15s;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}
.ui-f-acc.is-open .ui-f-acc-chev { transform: rotate(90deg); }
.ui-f-acc-body {
  display: none;
  padding: 0 0.5rem 0.5rem;
  flex-direction: column;
  gap: 0.3rem;
}
.ui-f-acc.is-open .ui-f-acc-body {
  display: flex;
}
.ui-f-acc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 0.35rem;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent, #61b3c4);
  color: #0b1220;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* ===== Preuzimanje podataka (dashboard) ===== */
.dlc-card h3 { margin-bottom: 0.85rem; }
.dlc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .dlc-grid { grid-template-columns: 1fr; }
}
.dlc-col {
  background: linear-gradient(180deg, rgba(165,214,241,.12), rgba(28,67,97,.04));
  border: 1px solid rgba(28,67,97,.12);
  border-radius: 14px;
  padding: 0.85rem 0.9rem 0.75rem;
}
.dlc-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1C4361;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dlc-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 72px;
  text-align: center;
  vertical-align: middle;
  font-weight: 500;
  font-size: 0.72rem;
  color: #61B3C4;
  background: rgba(97,179,196,.15);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}
.dlc-donut-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 0.65rem;
}
.dlc-donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#cbd5e1 0deg 360deg);
  box-shadow: inset 0 0 0 1px rgba(28,67,97,.06);
}
.dlc-donut-center {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(28,67,97,.08);
}
.dlc-donut-center strong {
  font-size: 1.45rem;
  color: #1C4361;
  line-height: 1.1;
}
.dlc-donut-center span {
  font-size: 0.72rem;
  color: #64748b;
}
.dlc-legend {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.dlc-leg-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: #1C4361;
  text-align: left;
}
.dlc-leg-row:hover { background: rgba(97,179,196,.12); }
.dlc-leg-row strong { margin-left: auto; font-size: 0.9rem; }
.dlc-leg-label { font-size: 0.8rem; }
.dlc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dlc-action {
  margin-top: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(239,68,68,.08), rgba(234,179,8,.08));
  border: 1px solid rgba(28,67,97,.1);
}
.dlc-action-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #1C4361;
  margin-bottom: 0.3rem;
}
.dlc-action-row {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 0.45rem;
  align-items: stretch;
}
.dlc-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  flex: 1 1 0;
  min-width: 0;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.25;
  color: #1C4361;
  box-shadow: 0 1px 3px rgba(28,67,97,.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dlc-action-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dlc-action-pill strong { font-size: 0.82rem; font-weight: 700; }
.dlc-pill-red { border-color: rgba(239,68,68,.35); }
.dlc-pill-amber { border-color: rgba(234,179,8,.4); }
.dlc-pill-dot { width: 8px; height: 8px; border-radius: 50%; }
.dlc-detail {
  position: fixed;
  z-index: 10000;
  align-items: flex-start;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 0;
  background: transparent;
}
.dlc-detail-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 0 0 14px 14px;
  background: var(--surface, #fff);
  color: var(--text, #1e293b);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
.dlc-detail-head {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding-right: 2.25rem;
  flex-shrink: 0;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  color: #1C4361;
  font-size: 0.9rem;
}
.dlc-detail-close {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
}
.dlc-detail-close:hover { color: var(--text); border-color: var(--accent); }
.dlc-table-wrap {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(28,67,97,.1);
}
.dlc-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.58rem;
}
.dlc-table th {
  position: sticky; top: 0;
  background: #f0f7fb;
  color: #1C4361;
  text-align: center;
  padding: 0.3rem 0.22rem;
  font-weight: 600;
  font-size: 0.56rem;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.dlc-table td {
  padding: 0.3rem 0.22rem;
  border-top: 1px solid rgba(28,67,97,.07);
  color: #1e293b;
  font-size: 0.66rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.dlc-code { display: block; font-size: 0.56rem; line-height: 1.2; color: #64748b; white-space: nowrap; }
.dlc-rem-ok { color: #16a34a; font-weight: 600; }
.dlc-rem-warn { color: #ca8a04; font-weight: 600; }
.dlc-rem-over { color: #dc2626; font-weight: 600; }
.dlc-rem-never { color: #64748b; }
/* dark theme adjustments */
[data-theme="dark"] .dlc-col {
  background: linear-gradient(180deg, rgba(97,179,196,.08), rgba(28,67,97,.15));
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .dlc-col-title,
[data-theme="dark"] .dlc-leg-row,
[data-theme="dark"] .dlc-action-title,
[data-theme="dark"] .dlc-detail-head,
[data-theme="dark"] .dlc-action-pill { color: var(--text); }
[data-theme="dark"] .dlc-donut-center { background: var(--surface); }
[data-theme="dark"] .dlc-donut-center strong { color: var(--text); }
[data-theme="dark"] .dlc-action-pill { background: var(--surface-2); }
[data-theme="dark"] .dlc-table th { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .dlc-table td { color: var(--text); border-color: rgba(255,255,255,.06); }
.audit-cleanup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-color: rgba(248,113,113,.35);
  color: #f87171;
}
.audit-cleanup-btn svg { width: 16px; height: 16px; }
.audit-cleanup-btn:hover { border-color: rgba(248,113,113,.65); color: #ef4444; }
.audit-cleanup-btn:disabled { opacity: 0.55; cursor: wait; }
.audit-cleanup-popover {
  position: fixed;
  z-index: 10060;
  width: min(276px, calc(100vw - 16px));
  box-sizing: border-box;
  border: 1px solid var(--border, rgba(148,163,184,.35));
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text, #1e293b);
  box-shadow: 0 12px 34px rgba(15,23,42,.22), 0 2px 7px rgba(15,23,42,.1);
  animation: auditCleanupIn .14s ease-out;
}
@keyframes auditCleanupIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.audit-cleanup-form { display: grid; gap: 0.5rem; padding: 0.75rem; }
.audit-cleanup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -0.1rem -0.1rem 0;
  cursor: grab;
  touch-action: none;
}
.audit-cleanup-heading:active { cursor: grabbing; }
.audit-cleanup-form h2 { margin: 0; font-size: 0.9rem; line-height: 1.25; }
.audit-cleanup-close {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #64748b);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.audit-cleanup-close:hover { background: var(--surface-2, #f1f5f9); color: var(--text, #1e293b); }
.audit-cleanup-form p { margin: 0; color: var(--muted, #64748b); font-size: 0.73rem; line-height: 1.4; }
.audit-cleanup-form label { margin-top: 0.1rem; font-size: 0.74rem; font-weight: 600; }
.audit-cleanup-form select,
.audit-cleanup-form input {
  width: 100%;
  min-height: 32px;
  box-sizing: border-box;
  padding: 0 0.5rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text, #1e293b);
  font: inherit;
  font-size: 0.78rem;
}
.audit-cleanup-dialog-actions { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 0.2rem; }
.audit-cleanup-dialog-actions .btn { min-height: 30px; padding: 0.25rem 0.6rem; font-size: 0.75rem; }
@media (max-width: 640px) {
  .dlc-detail-dialog { padding: 0.7rem; }
}

/* Dashboard scrolls & compact side */
#dash-recent-list {
  max-height: 360px; /* ~8–10 stavki */
  overflow-y: auto;
  padding-right: 0.25rem;
}
.db-card-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.db-side-split {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border, rgba(28,67,97,.1));
  padding-top: 0.55rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.db-side-subhead {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1C4361;
  margin-bottom: 0.35rem;
}
.db-side-search {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2, #f8fafc);
  color: var(--text);
  padding: 0 0.55rem;
  margin-bottom: 0.4rem;
  font: inherit;
  font-size: 0.82rem;
}
.db-side-scroll {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border, rgba(28,67,97,.1));
  border-radius: 10px;
  background: var(--surface, #fff);
}
.db-side-scroll .table-wrap { max-height: none; overflow: visible; }
.db-side-scroll table { font-size: 0.78rem; }
.db-side-scroll th, .db-side-scroll td { padding: 0.35rem 0.45rem; }
.dlc-pct { font-weight: 500; color: var(--muted, #64748b); font-size: 0.78em; }
[data-theme="dark"] .db-side-subhead { color: var(--text); }
[data-theme="dark"] .db-side-scroll { background: var(--surface); }

.db-side-pager { margin-top: 0.35rem; font-size: 0.75rem; color: var(--muted); }
.db-dl-list#dash-recent-list, #dash-recent-list.db-dl-list {
  max-height: 360px;
  overflow-y: auto;
}

.db-side-scroll { max-height: 240px !important; overflow-y: auto !important; }
#dash-recent-list {
  max-height: 448px !important;
  overflow-y: auto !important;
}

.dlc-donut {
  background: transparent !important;
  box-shadow: none !important;
}
.dlc-donut .dlc-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.dlc-seg {
  transition: opacity .15s, transform .15s;
  transform-origin: 50% 50%;
}
.dlc-seg:hover {
  opacity: 0.88;
  filter: brightness(1.08);
}
.dlc-donut-center {
  inset: 28% !important;
  pointer-events: none;
}
.dlc-center-sub {
  font-size: 0.62rem;
  color: #61B3C4;
  font-weight: 600;
  margin-top: 0.1rem;
  line-height: 1.1;
}
.dlc-seg-pct {
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* Donut prsten — boje statusa + % oko broja */
.dlc-donut-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 0.75rem;
}
.dlc-donut {
  width: 100%;
  height: 100%;
  background: transparent !important;
  box-shadow: none !important;
}
.dlc-donut .dlc-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.dlc-seg {
  transition: opacity .15s, filter .15s;
}
.dlc-seg:hover {
  filter: brightness(1.08);
  opacity: 0.95;
}
.dlc-seg-pct {
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  font-family: system-ui, -apple-system, sans-serif;
}
.dlc-donut-center {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(28,67,97,.1);
  pointer-events: none;
  z-index: 2;
}
.dlc-donut-center strong {
  font-size: 1.55rem;
  color: #1C4361;
  line-height: 1.05;
  font-weight: 700;
}
.dlc-donut-center span {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.05rem;
}
[data-theme="dark"] .dlc-donut-center {
  background: var(--surface, #141a24);
}
[data-theme="dark"] .dlc-donut-center strong {
  color: var(--text);
}


/* Dashboard layout v2 */
.db-diagrams {
  width: 100%;
}
.db-diagrams .dlc-card {
  width: 100%;
}
.db-mid-2 {
  display: grid !important;
  grid-template-columns: 1.2fr 0.8fr !important;
  gap: 0.75rem;
}
@media (max-width: 1100px) {
  .db-mid-2 { grid-template-columns: 1fr !important; }
}
.db-card-inf {
  width: 100%;
  margin-top: 0.15rem;
}
.db-inf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.db-inf-head h3 {
  margin: 0;
}
.db-inf-scroll {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.db-inf-scroll table {
  width: 100%;
  font-size: 0.82rem;
  border-collapse: collapse;
}
.db-inf-scroll th,
.db-inf-scroll td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.db-inf-scroll th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  z-index: 1;
}

/* dash layout v3 – 3 kolone + prekršaji ispod */
.db-page[data-dash-layout="v3"] {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
}
.db-page[data-dash-layout="v3"] > .db-mid-3 {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr 0.85fr !important;
  gap: 0.75rem !important;
  width: 100% !important;
  align-items: stretch;
}
.db-page[data-dash-layout="v3"] > .db-card-inf {
  width: 100% !important;
}
.db-page[data-dash-layout="v3"] .dlc-card .dlc-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem !important;
}
@media (max-width: 1100px) {
  .db-page[data-dash-layout="v3"] > .db-mid-3 { grid-template-columns: 1fr !important; }
}

.db-page[data-dash-layout="v3"] .dlc-action-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.45rem !important;
}
.db-page[data-dash-layout="v3"] .dlc-action-pill {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  font-size: 0.7rem !important;
  padding: 0.28rem 0.45rem !important;
}

/* Prekršaji – bez senke preko "Otvori izveštaj" */
.db-card-inf {
  overflow: visible;
  position: relative;
}
.db-inf-head {
  position: relative;
  z-index: 5;
  background: var(--surface, transparent);
  margin-bottom: 0.55rem;
  padding-bottom: 0.15rem;
  box-shadow: none !important;
  filter: none !important;
}
.db-inf-head .linkish,
.db-card-inf .linkish {
  position: relative;
  z-index: 6;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  background: transparent !important;
}
.db-inf-scroll {
  position: relative;
  z-index: 1;
  box-shadow: none !important;
}
.db-inf-scroll th {
  box-shadow: none !important;
}

/* % u prstenu – ne van */
.dlc-donut-wrap {
  overflow: hidden;
}
.dlc-donut .dlc-svg {
  overflow: hidden !important;
}
.dlc-seg-pct {
  text-shadow: 0 0.5px 1px rgba(0,0,0,.45);
  font-size: 0.55rem;
}

/* isti stil linka kao "Pogledaj sve" na preuzimanjima */
.db-card-inf > h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.db-card-inf > h3 .linkish,
.db-card-inf .linkish {
  background: none !important;
  border: none !important;
  color: var(--muted) !important;
  font-size: 0.8rem !important;
  cursor: pointer;
  font-weight: 500 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  padding: 0 !important;
}
.dlc-seg-pct {
  font-size: 4px !important;
}

/* Za obradu – tanji pillovi */
.dlc-action {
  margin-top: 0.65rem !important;
  padding: 0.4rem 0.55rem !important;
}
.dlc-action-title {
  font-size: 0.68rem !important;
  margin-bottom: 0.28rem !important;
}
.dlc-action-pill {
  padding: 0.26rem 0.42rem !important;
  font-size: 0.68rem !important;
  line-height: 1.2 !important;
  gap: 0.28rem !important;
}
.dlc-action-pill strong {
  font-size: 0.78rem !important;
}
.dlc-pill-dot {
  width: 6px !important;
  height: 6px !important;
}
