/* ======================================================
   RIU REGISTAR - JAVNI PRIKAZ
   ====================================================== */

.rzs-wrap {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1e1e1e;
}

/* ======================================================
   NASLOV
   ====================================================== */
.rzs-main-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e1e1e;
  margin: 0 0 24px 0;
  padding: 0;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 768px) {
  .rzs-main-title {
    font-size: 20px;
    margin: 0 0 20px 0;
  }
}

/* ======================================================
   FILTERI / KONTROLE
   ====================================================== */
.rzs-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0 0 16px 0;
}

.rzs-control label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
  color: #333;
}

.rzs-control select,
.rzs-control input {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd3d7;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  color: #1e1e1e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

/* Select opcije - tekst prelom */
.rzs-control select option {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rzs-control select:focus,
.rzs-control input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.rzs-control.rzs-reset {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

/* Reset + Analitika dugmad u istom redu (DESKTOP) */
.rzs-control.rzs-buttons-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

/* DESKTOP: Sakriveni mobilni elementi */
.rzs-action-buttons,
.rzs-analytics-row {
  display: none;
}

/* Search wrapper - input + dugme */
.rzs-search-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rzs-search-wrapper #rzs-search {
  flex: 1;
  min-width: 0;
}

.rzs-btn-search {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 20px;
}

/* ======================================================
   CUSTOM DROPDOWN (za institucije i funkcije)
   ====================================================== */
.rzs-dropdown {
  position: relative;
  width: 100%;
}

.rzs-dropdown-toggle {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid #cfd3d7;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  color: #1e1e1e;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  min-height: 42px;
}

.rzs-dropdown-toggle:hover {
  border-color: #2271b1;
}

.rzs-dropdown-toggle:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.rzs-dropdown-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rzs-dropdown-arrow {
  position: absolute;
  right: 12px;
  font-size: 10px;
  color: #666;
  transition: transform 0.2s ease;
}

.rzs-dropdown.open .rzs-dropdown-arrow {
  transform: rotate(180deg);
}

.rzs-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #cfd3d7;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rzs-dropdown.open .rzs-dropdown-menu {
  display: block;
}

/* v0.9.31: SEARCH BOX u dropdown-u */
.rzs-dropdown-search {
  padding: 8px;
  border-bottom: 2px solid #e0e0e0;
  background: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 10;
}

.rzs-dropdown-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cfd3d7;
  border-radius: 4px;
  font-size: 14px;
  color: #1e1e1e;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rzs-dropdown-search-input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.rzs-dropdown-search-input::placeholder {
  color: #999;
  font-style: italic;
}

/* Container za opcije - scrollable */
.rzs-dropdown-options {
  max-height: 260px;
  overflow-y: auto;
}

.rzs-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #1e1e1e;
  /* KLJUČNO: omogući prelom teksta */
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

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

.rzs-dropdown-item:hover {
  background: #f0f6ff;
}

.rzs-dropdown-item.selected {
  background: #e6f0ff;
  font-weight: 600;
}

.rzs-dropdown-item.rzs-highlighted {
  background: #d0e8ff;
  border-left: 3px solid #2271b1;
}

.rzs-dropdown-item.rzs-dd-placeholder {
  color: #666;
  font-style: italic;
}

/* ======================================================
   DUGMAD
   ====================================================== */
.rzs-btn {
  padding: 10px 18px;
  border: 1px solid #2271b1;
  background: #2271b1;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.rzs-btn:hover {
  background: #135e96;
  border-color: #135e96;
  color: #fff;
}

.rzs-btn:active {
  transform: translateY(1px);
}

/* ======================================================
   TABELA WRAP
   ====================================================== */
.rzs-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ======================================================
   TABELA (DESKTOP)
   ====================================================== */
.rzs-table {
  width: 100%;
  border-collapse: collapse;
  /* min-width uklonjeno - tabela se prilagođava širini ekrana */
  table-layout: fixed;
}

.rzs-table th,
.rzs-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

.rzs-table thead th {
  position: sticky;
  top: 0;
  background: #2271b1;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  z-index: 1;
  border-bottom: 2px solid #135e96;
}

/* HOVER HIGHLIGHT */
.rzs-table tbody tr:hover td {
  background: #f0f6ff;
}

/* Hover za sticky Info kolonu - mora imati istu boju */
.rzs-table tbody tr:hover td:nth-child(9) {
  background: #f0f6ff;
}

.rzs-loading {
  text-align: center;
  padding: 24px;
  color: #666;
  font-style: italic;
}

/* ======================================================
   ŠIRINE KOLONA (DESKTOP) - Optimizovano za prilagodljiv prikaz
   ====================================================== */
/* Kolone će se automatski prilagoditi dostupnom prostoru */

/* Kolone za 9-kolonsku tabelu Registra zaposlenih */
.rzs-table th:nth-child(1), .rzs-table td:nth-child(1) { width: 7%; }   /* Ime */
.rzs-table th:nth-child(2), .rzs-table td:nth-child(2) { width: 8%; }   /* Prezime */
.rzs-table th:nth-child(3), .rzs-table td:nth-child(3) { width: 20%; }  /* Naziv institucije */
.rzs-table th:nth-child(4), .rzs-table td:nth-child(4) { width: 9%; }   /* Sjedište */
.rzs-table th:nth-child(5), .rzs-table td:nth-child(5) { width: 17%; }  /* Radno mjesto */
.rzs-table th:nth-child(6), .rzs-table td:nth-child(6) { width: 9%; }   /* Stepen SS zap. */
.rzs-table th:nth-child(7), .rzs-table td:nth-child(7) { width: 12%; }  /* Stručno zvanje */
.rzs-table th:nth-child(8) { width: 10%; text-align: center; }
.rzs-table td:nth-child(8) { width: 10%; text-align: right; white-space: nowrap; } /* Plata */
.rzs-table th:nth-child(9), .rzs-table td:nth-child(9) {
  width: 60px;
  position: sticky; right: 0;
  background: #fff;
  box-shadow: -2px 0 4px rgba(0,0,0,0.05);
  z-index: 2;
  text-align: center;
  vertical-align: middle;
  padding: 12px 10px;
}
.rzs-table thead th:nth-child(9) { background: #2271b1; z-index: 3; }

/* ======================================================
   INFO DUGME - SIMPLIFICIRANO
   ====================================================== */
.rzs-info-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #2271b1;
  background: #2271b1;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  display: inline-block;
  padding: 0;
  /* BEZ hover efekta! */
}

/* ======================================================
   SORT IKONE
   ====================================================== */
.rzs-sort {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.rzs-sort::before {
  content: "⇅";
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-right: 4px;
}

.rzs-sort.asc::before,
.rzs-sort.desc::before {
  color: #fff;
}

.rzs-sort.asc::after {
  content: " ▲";
  font-size: 10px;
  color: #fff;
}

.rzs-sort.desc::after {
  content: " ▼";
  font-size: 10px;
  color: #fff;
}

/* ======================================================
   FOOTER / PAGINACIJA
   ====================================================== */
.rzs-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  gap: 12px;
}

.rzs-meta {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  color: #555;
  font-size: 13px;
}

.rzs-pagination {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rzs-page {
  border: 1px solid #2271b1;
  background: #2271b1;
  color: #fff !important;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rzs-page:hover,
.rzs-page:focus {
  background: #1f6fb2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transform: translateY(-1px);
  outline: none !important;
}

.rzs-page.active {
  background: #0a4b78;
  border-color: #0a4b78;
}

.rzs-page.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Kill theme focus outlines */
.rzs-page:focus,
.rzs-page:focus-visible,
.rzs-pagination a:focus,
.rzs-pagination a:focus-visible,
.rzs-pagination span:focus,
.rzs-pagination span:focus-visible,
.rzs-pagination :where(a, span):focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ======================================================
   MOBILNI LABELS (sakriveni na desktopu)
   ====================================================== */
.rzs-m-label {
  display: none;
}

.rzs-m-val {
  display: inline;
}

/* ======================================================
   RESPONSIVE - TABLET (max 1024px)
   ====================================================== */
@media (max-width: 1024px) {
  .rzs-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .rzs-control.rzs-reset {
    grid-column: span 1;
  }
}

/* ======================================================
   RESPONSIVE - MOBILNI (max 768px) - CARD LAYOUT
   ====================================================== */
@media (max-width: 768px) {
  /* FIX: SVE u JEDNOJ KOLONI - vertikalno */
  .rzs-controls {
    grid-template-columns: 1fr; /* Jedna kolona */
    gap: 12px;
    position: relative;
  }

  /* Custom dropdown na mobilnom */
  .rzs-dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
  }
  
  .rzs-dropdown-options {
    max-height: 150px;
    overflow-y: auto;
  }
  
  /* FIX: Dropdown z-index - ne prelazi preko dugmadi */
  .rzs-dropdown {
    z-index: 100;
  }
  
  .rzs-dropdown.open {
    z-index: 1001;
  }

  .rzs-dropdown-item {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Svaki kontrolni element puna širina */
  .rzs-control {
    grid-column: span 1 !important;
  }
  
  /* Pretraga input PUNA ŠIRINA */
  .rzs-control.rzs-search {
    grid-column: span 1;
  }
  
  /* Sakrij desktop "Pretraži" dugme u wrapper-u */
  .rzs-search-wrapper .rzs-btn-search {
    display: none;
  }
  
  /* MOBILNI: Sakrij desktop buttons-row */
  .rzs-control.rzs-buttons-row {
    display: none !important;
  }
  
  /* MOBILNI: Prikaži action buttons (Pretraži + Poništi) */
  .rzs-action-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr; /* 2 kolone */
    gap: 8px;
    margin-top: 0;
  }
  
  .rzs-action-buttons .rzs-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  /* MOBILNI: Prikaži Analitika dugme */
  .rzs-analytics-row {
    display: block !important;
  }
  
  .rzs-analytics-row .rzs-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  .rzs-meta {
    justify-content: center;
    text-align: center;
  }

  /* Tabela postaje card layout */
  .rzs-table {
    min-width: 0;
    table-layout: auto;
  }

  /* Sakrij header */
  .rzs-table thead {
    display: none;
  }

  /* Red postaje kartica */
  .rzs-table tbody tr {
    display: block;
    margin: 12px 0;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .rzs-table tbody tr:first-child {
    margin-top: 0;
  }

  /* Ćelije kao label:value parovi */
  .rzs-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    text-align: left;
    white-space: normal;
    width: auto !important;
  }

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

  /* Label/value styling */
  .rzs-m-label {
    display: block;
    flex-shrink: 0;
    min-width: 40%;
    max-width: 45%;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: left !important;
  }

  .rzs-m-val {
    display: block;
    flex: 1;
    text-align: left;
    color: #1e1e1e;
    word-break: break-word;
  }

  /* Iznos - samo bold, bez desnog poravnanja */
  .rzs-table tbody td.rzs-right .rzs-m-label {
    text-align: left !important;
  }

  .rzs-table tbody td.rzs-right .rzs-m-val {
    text-align: left;
    font-weight: 600;
    color: #0a6f0a;
  }

  /* Info kolona */
  .rzs-info-col {
    text-align: left;
    background: #f8f9fa;
    padding: 12px 16px !important;
  }
  
  .rzs-info-col .rzs-m-label {
    display: none;
  }
  
  .rzs-info-col .rzs-m-val {
    text-align: center;
    width: 100%;
  }
  
  .rzs-info-col .rzs-info-btn {
    width: 100%;
    height: 40px;
    font-size: 14px;
  }
}

/* ======================================================
   RESPONSIVE - MALI MOBITELI (max 480px)
   ====================================================== */
@media (max-width: 480px) {
  .rzs-controls {
    grid-template-columns: 1fr;
  }

  .rzs-control.rzs-search,
  .rzs-control.rzs-reset {
    grid-column: span 1;
  }

  .rzs-table tbody td {
    padding: 10px 14px;
    flex-direction: column;
    gap: 4px;
  }

  .rzs-m-label {
    min-width: 100%;
    max-width: 100%;
    margin-bottom: 2px;
    text-align: left !important;
  }

  .rzs-m-val {
    text-align: left !important;
    width: 100%;
  }

  .rzs-table tbody td.rzs-right .rzs-m-label {
    text-align: left !important;
  }

  .rzs-table tbody td.rzs-right .rzs-m-val {
    text-align: left !important;
  }
}

/* ======================================================
   MODAL
   ====================================================== */
.rzs-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.rzs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.rzs-modal-dialog {
  position: relative;
  width: 900px;
  max-width: 100%;
  margin: 20px auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.rzs-modal-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.rzs-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e1e1e;
}

.rzs-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.rzs-modal-close:hover {
  background: #e5e5e5;
  color: #333;
}

.rzs-modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.rzs-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  background: #f8f9fa;
}

/* ======================================================
   MODAL - DETALJI
   ====================================================== */
.rzs-details {
  display: grid;
  gap: 8px;
}

.rzs-detail-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fafafa;
}

.rzs-detail-key {
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.rzs-detail-val {
  word-break: break-word;
  color: #1e1e1e;
}

/* MODAL RESPONSIVE */
@media (max-width: 768px) {
  .rzs-modal {
    padding: 10px;
  }
  
  .rzs-modal-dialog {
    margin: 10px auto;
    border-radius: 10px;
  }
  
  .rzs-modal-header {
    padding: 14px 16px;
  }
  
  .rzs-modal-header h3 {
    font-size: 16px;
  }
  
  .rzs-modal-body {
    padding: 16px;
    max-height: 60vh;
  }
  
  .rzs-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }
  
  .rzs-detail-key {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #666;
  }
}

@media (max-width: 480px) {
  .rzs-modal-body {
    max-height: 55vh;
  }
  
  .rzs-modal-footer {
    padding: 12px 16px;
  }
  
  .rzs-modal-footer .rzs-btn {
    width: 100%;
  }
}

/* ======================================================
   PRINT STYLES
   ====================================================== */
@media print {
  .rzs-controls,
  .rzs-pagination,
  .rzs-info-col,
  .rzs-modal {
    display: none !important;
  }
  
  .rzs-table-wrap {
    overflow: visible;
    border: none;
    box-shadow: none;
  }
  
  .rzs-table {
    min-width: 0;
  }
  
  .rzs-table th,
  .rzs-table td {
    border: 1px solid #ccc;
    padding: 8px;
  }
}

/* ======================================================
   ANALITIKA DUGME I MODAL
   ====================================================== */

.rzs-btn-analytics {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rzs-btn-analytics:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  color: #fff;
}

.rzs-analytics-btn {
  display: flex;
  align-items: flex-end;
}

/* Analitika modal - veći */
.rzs-analytics-modal .rzs-modal-dialog.rzs-modal-xl {
  max-width: 95%;
  width: 1400px;
  max-height: 95vh;
}

.rzs-analytics-modal .rzs-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(95vh - 140px);
}

.rzs-analytics-modal .rzs-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.rzs-analytics-modal .rzs-modal-header h3 {
  color: #fff;
}

.rzs-analytics-modal .rzs-modal-close {
  color: #fff;
}

.rzs-analytics-modal .rzs-modal-close:hover {
  background: rgba(255,255,255,0.2);
}

/* Loading spinner */
.rzs-analytics-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.rzs-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: riu-spin 1s linear infinite;
}

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

/* Analitika summary kartice */
.rzs-analytics-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.rzs-summary-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rzs-summary-card.rzs-card-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.rzs-summary-card.rzs-card-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: #fff;
}

.rzs-summary-card.rzs-card-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.rzs-summary-card.rzs-card-info {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.rzs-summary-number {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.rzs-summary-label {
  font-size: 13px;
  margin-top: 6px;
  opacity: 0.9;
}

/* Grafikon grid */
.rzs-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.rzs-chart-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rzs-chart-box h4 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.rzs-chart-container {
  position: relative;
  height: 280px;
}

/* Za PIE grafikone manji */
.rzs-chart-box.rzs-pie-chart .rzs-chart-container {
  height: 240px;
}

/* Fullwidth grafikon (suma naknada po institucijama) */
.rzs-chart-box.rzs-chart-fullwidth {
  margin: 24px 0;
}

.rzs-chart-container.rzs-chart-tall {
  height: 700px;
}

/* Responsive za analitiku */
@media (max-width: 1200px) {
  .rzs-charts-grid {
    grid-template-columns: 1fr;
  }
  
  .rzs-analytics-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .rzs-chart-container.rzs-chart-tall {
    height: 600px;
  }
}

@media (max-width: 600px) {
  .rzs-analytics-summary {
    grid-template-columns: 1fr;
  }
  
  .rzs-analytics-modal .rzs-modal-dialog.rzs-modal-xl {
    width: 98%;
    max-width: 98%;
  }
}

/* ── ANALITIKA – novi layout ───────────────────────────────────── */
.rzs-an-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.rzs-an-kpi-card {
  background: linear-gradient(135deg, #2271b1, #135e96);
  color: #fff; border-radius: 8px; padding: 18px 14px; text-align: center;
}
.rzs-an-kpi-card.green   { background: linear-gradient(135deg, #00a32a, #0a6f0a); }
.rzs-an-kpi-card.orange  { background: linear-gradient(135deg, #c07a00, #8a5800); }
.rzs-an-kpi-card.teal    { background: linear-gradient(135deg, #00897b, #00695c); }
.rzs-an-kpi-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.rzs-an-kpi-lbl { font-size: 11px; opacity: .85; margin-top: 5px; line-height: 1.4; }

.rzs-an-section {
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
  padding: 20px; margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.rzs-an-section-header { margin-bottom: 14px; }
.rzs-an-title {
  font-size: 15px; font-weight: 700; color: #1d2327;
  margin: 0 0 10px 0; padding-bottom: 10px;
  border-bottom: 2px solid #2271b1;
}
.rzs-an-controls {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.rzs-an-controls label { font-size: 13px; font-weight: 600; color: #50575e; }
.rzs-an-controls select {
  padding: 6px 10px; border: 1px solid #ced4da;
  border-radius: 5px; font-size: 13px;
}
.rzs-an-info-tag {
  display: inline-block; background: #e8f0ff; color: #2271b1;
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  font-style: italic;
}
.rzs-an-chart-wrap { position: relative; height: 300px; }
.rzs-an-chart-wrap.rzs-an-tall  { height: 420px; }
.rzs-an-chart-wrap.rzs-an-short { height: 220px; }

/* Fond totali */
.rzs-an-fond-totals {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid #eee;
}
.rzs-fond-total-row { display: flex; align-items: center; gap: 8px; }
.rzs-fond-lbl { font-size: 13px; color: #50575e; }
.rzs-fond-val { font-size: 15px; font-weight: 700; color: #2271b1; }
.rzs-fond-total-row.total .rzs-fond-lbl { font-weight: 700; color: #1d2327; }
.rzs-fond-total-row.total .rzs-fond-val { color: #00a32a; font-size: 17px; }

/* Spinner */
.rzs-analytics-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; }
.rzs-analytics-loading p { color: #666; margin-top: 14px; }

/* Mali button */

/* ── Info obavijest iznad tabele ──────────────────────── */
.rzs-info-notice {
  background: #eaf3fb;
  border: 1px solid #b6d4ec;
  border-left: 4px solid #2271b1;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 18px;
  color: #1d3a52;
  font-size: 14px;
  line-height: 1.5;
}
