/* =============================== */
/*   GLOBALNI STIL TABELA I STRANA */
/* =============================== */
body {
  font-family: Arial, sans-serif;
  background-color: #2D409C; /* glavna plava pozadina svih stranica 465EB9 */
  color: #ffffff;
  margin: 0;
  padding: 0;
}
/* ============================================== */
/* 🌐 GLOBALNI STIL ZA SVE TABELE (GRID FORMAT)   */
/* ============================================== */
table, .tabela-klijenti, .tabela-rashodi, .tabela-zaduzenje, .tabela-usluge {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-top: 10px;
  table-layout: auto;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15); /* okvir tabele */
  border-radius: 6px;
  overflow: hidden;
}

/* Zaglavlja */
table th {
  background-color: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-weight: bold;
  text-align: center;
  border-bottom: 2px solid rgba(255,255,255,0.25);
  padding: 10px 8px;
}

/* Redovi */
table td {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 8px 10px;
  color: #f8f8f8;
}

/* Linije između kolona */
table th + th, table td + td {
  border-left: 1px solid rgba(255,255,255,0.08);
}

/* Alternirajući redovi (bolja čitljivost) */
table tr:nth-child(even) {
  background-color: rgba(255,255,255,0.04);
}

/* Hover efekat */
table tr:hover {
  background-color: rgba(255,255,255,0.08);
  transition: background 0.2s ease;
}

/* Podebljan prvi red */
table thead tr:first-child th {
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* Obrubljene ćelije u grid stilu */
table th, table td {
  border-right: 1px solid rgba(255,255,255,0.08);
}

/* Ukloni border na poslednjoj koloni */
table th:last-child, table td:last-child {
  border-right: none;
}
/* ============================================== */
/* 🖨️  STILOVI ZA ŠTAMPU – PRIKAZ GRID LINIJA     */
/* ============================================== */
@media print {

  /* Sve tabele dobijaju vidljive crne ivice */
  table, 
  .tabela-klijenti, 
  .tabela-zaduzenje, 
  .tabela-usluge, 
  .tabela-rashodi {
    border: 1px solid #000 !important;
    border-collapse: collapse !important;
    color: #000 !important;
    background: #fff !important;
  }

  /* Ćelije i zaglavlja – pune linije kao u Excelu */
  table th, 
  table td {
    border: 1px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact; /* sprečava gubitak boja u Chrome-u */
    print-color-adjust: exact;
  }

  /* Ukloni plave pozadine i hover efekte */
  body, main, .content {
    background: #fff !important;
    color: #000 !important;
  }

  /* Ukloni nepotrebne elemente prilikom štampe */
  header, footer, .app-footer, .nav-bar, .btn, button {
    display: none !important;
  }

  /* Razmak između tabela i ivica papira */
  table {
    margin: 10px 0;
  }
}


/* Uklanjanje horizontalnog scrolla sa stranice */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Glavni sadržaj — nema horizontalnog skrola */
main, .content {
  flex: 1;
  width: 100%;
  padding: 20px;
  padding-bottom: 50px;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto;
} 


/* Kolone automatski podešene prema sadržaju, bez prelamanja */
table th, table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.15);
} 

/* Dugmad u tabelama */
table td a, table td button {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  margin: 0 2px;
  white-space: nowrap;
}

/* Inputi se prilagođavaju ćeliji */
table td input[type="text"],
table td input[type="number"],
table td input[type="email"],
table td input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #999;
}

/* Wrapper za tabele — sprečava širenje 
.table-wrapper {
  display: block;
  width: 100%;
  overflow-x: auto;    /* dozvoljeno samo za ekstremne slučajeve 
  scrollbar-width: thin;
} */

/* Footer uvek punom širinom */
footer, .app-footer {
  width: 100%;
  left: 0;
  right: 0;
  margin-top: auto;
}

/* === STIL UNUTAR IFRAME-a (EDIT KARTICA) === */

.edit-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  padding: 25px 30px;
  color: #000;
  font-family: Arial, sans-serif;
  max-width: 580px;
  margin: 20px auto;
}

.edit-header {
  background: #0e1b4c; /* tamno plava */
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  padding: 10px 15px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-header span.icon {
  font-size: 18px;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}

.form-row label {
  flex: 0 0 140px;
  font-weight: bold;
}

.form-row input,
.form-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
}

.total-line {
  margin: 15px 0;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  border-top: 1px dashed #ccc;
  padding-top: 10px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  gap: 10px;
}

.btn-primary {
  background: #2b7cff;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary {
  background: #eee;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}
/* === MODAL === */
.modal-edit {
  background: #fff;
  border-radius: 12px;
  padding: 35px 45px;
  width: 80%;
  max-width: 600px;
  max-height: 90vh;
  margin: auto;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  color: #000;
  overflow-y: auto;
}


/* Tamnoplavi heder kao na slici */
.modal-edit .header {
  background: #0b1448;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  padding: 12px 18px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-edit .header span.icon {
  margin-right: 8px;
  font-size: 18px;
}
.modal-edit .header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.modal-edit .header button:hover { color: #ff8080; }

/* Polja i raspored */
.modal-edit .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  gap: 10px;
}
.modal-edit .row label {
  flex: 0 0 150px;
  font-weight: bold;
}
.modal-edit .row input,
.modal-edit .row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
}

/* Ukupno linija */
.modal-edit .total {
  display: flex;
  justify-content: space-between;
  border: 1px solid #ccc;
  background: #f8f8f8;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 15px 0;
  font-weight: bold;
}

/* Dugmad */
.modal-edit .footer {
  text-align: right;
  margin-top: 20px;
}
.modal-edit .footer button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-left: 8px;
}
.modal-edit .footer .cancel {
  background: #e6f6e6;
  color: #007700;
}
.modal-edit .footer .cancel:hover {
  background: #d0edd0;
}
.modal-edit .footer .save {
  background: #2b7cff;
  color: #fff;
}
.modal-edit .footer .save:hover {
  background: #1a64d8;
}
.modal-edit .row textarea {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
  resize: vertical;     /* dozvoljava vertikalno širenje, sprečava horizontalno */
  min-height: 60px;     /* da ne izgleda kao kvadrat */
}

.modal-frame {
  position: fixed;           /* sada modal postaje apsolutno centriran */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;   /* horizontalno centriranje */
  align-items: center;       /* vertikalno centriranje */
  background: transparent;
  z-index: 9999;
  overflow: auto;
  box-sizing: border-box;
}
.modal-frame iframe {
  width: 30vw;          /* 80% širine ekrana */
  height: 70vh;         /* 85% visine ekrana */
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.45);
  background: #fff; 
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  display: none;
}

/* ===================================== */
/*   STIL ZA TABLU NEPREPOZNATE UPLATE   */
/* ===================================== */

.tabela-nepoznate {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
}

/* Header */
.tabela-nepoznate th {
  background-color: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 10px 8px;
  border-bottom: 2px solid rgba(255,255,255,0.25);
}

/* Ćelije */
.tabela-nepoznate td {
  color: #f8f8f8;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* Alternirajući redovi i hover */
.tabela-nepoznate tr:nth-child(even) {
  background-color: rgba(255,255,255,0.04);
}
.tabela-nepoznate tr:hover {
  background-color: rgba(255,255,255,0.08);
  transition: background 0.2s ease;
}

/* ========================= */
/*   ŠIRINE PO KOLONAMA     */
/* ========================= */

/* Firma */
.tabela-nepoznate th:first-child,
.tabela-nepoznate td:first-child {
  width: 30%; }
/* Iznos */
.tabela-nepoznate th:nth-child(2),
.tabela-nepoznate td:nth-child(2) {
  width: 8%; text-align: right;
}
/* Datum */
.tabela-nepoznate th:nth-child(3),
.tabela-nepoznate td:nth-child(3) {
  width: 6%; text-align: center;
}
/* Izvod broj */
.tabela-nepoznate th:nth-child(4),
.tabela-nepoznate td:nth-child(4) {
  width: 6%; text-align: center;
}
/* Poziv na broj */
.tabela-nepoznate th:nth-child(5),
.tabela-nepoznate td:nth-child(5) {
  width: 6%; text-align: center;
}
/* Poveži/Obriši */
.tabela-nepoznate th:nth-child(6),
.tabela-nepoznate td:nth-child(6) {
  width: 18%; text-align: center;
}
/* Kreiraj */
.tabela-nepoznate th:last-child,
.tabela-nepoznate td:last-child {
  width: 23%; text-align: center;
}

/* =============================== */
/*   Forme i dugmad u tabeli       */
/* =============================== */
.tabela-nepoznate form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tabela-nepoznate input[type="text"],
.tabela-nepoznate select {
  width: 95%;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #999;
  color: #000; /* samo unutar inputa crni tekst radi čitljivosti */
  background: #fff;
}

.tabela-nepoznate button {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #000;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

/* Dugmad u skladu sa globalnim tonom */
.tabela-nepoznate .btn-sacuvaj,
.tabela-nepoznate .btn-save {
  background: #2b7cff;
  color: #fff;
}
.tabela-nepoznate .btn-sacuvaj:hover,
.tabela-nepoznate .btn-save:hover {
  background: #1a64d8;
}

.tabela-nepoznate .btn-delete {
  background: #ff5656;
  color: #fff;
}
.tabela-nepoznate .btn-delete:hover {
  background: #cc4040;
}

/* =============================================== */
/*   FADEOUT ANIMACIJA ZA PORUKE (GLOBALNO)       */
/* =============================================== */

@keyframes fadeOutSmooth {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-5px); }
}

.msg {
  transition: opacity 0.8s ease;
}

/* Kad se doda klasa .fadeout, animacija se aktivira */
.msg.fadeout {
  animation: fadeOutSmooth 0.8s forwards;
}
/* Floating toast poruka */
.msg-floating {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%); /* isprva iznad ekrana */
  z-index: 9999;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

/* Kad je aktivna (vidljiva) */
.msg-floating.show {
  transform: translate(-50%, 20px); /* spusti malo ispod headera */
  opacity: 1;
}

/* =============================== */
/*           NASLOVI / TEKST       */
/* =============================== */

h1, h2, p {
  color: #ffffff;
}

/* =============================== */
/*           KONTEJNERI            */
/* =============================== */

.container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* =============================== */
/*        SISTEM PORUKA            */
/* =============================== */

.msg {
  padding: 8px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 600;
  display: inline-block;
}

/* Poruka uspeha */
.msg.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #b7dfb4;
}

/* Poruka brisanja */
.msg.deleted {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Poruka ažuriranja */
.msg.updated {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* =============================== */
/*      OBRAZAC ZA ZADUŽENJE       */
/* =============================== */

.zaduzivanje-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.zaduzivanje-form-row label {
  margin-right: 5px;
  font-weight: bold;
}

.zaduzivanje-form-row input,
.zaduzivanje-form-row select {
  padding: 4px 6px;
}

/* =============================== */
/*       INFO PANEL ZADUŽENJA      */
/* =============================== */

.zaduzenje-info {
  position: relative;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 20px;
  align-items: center;
  background: #191970;
  color: #fff;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 6px;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.zaduzenje-info span {
  background: transparent;
  padding: 5px 10px;
  border-radius: 6px;
}

/* =============================== */
/*       DUGME / BUTTON STILOVI    */
/* =============================== */

.btn, .btn-save, .btn-delete, .btn-print, .btn-sacuvaj {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  border: 1px solid #000;
  transition: 0.2s;
}

/* Dugme "Sačuvaj" i "Uvoz iz banke" */
.btn-sacuvaj, .btn-save {
  background: #2b7cff;
}
.btn-sacuvaj:hover, .btn-save:hover {
  background: #1a64d8;
}

/* Dugme "Obriši" */
.btn-delete {
  background: #ff5656;
}
.btn-delete:hover {
  background: #cc4040;
}

/* Dugme "Štampaj" */
.btn-print {
  background: #11a05c;
}
.btn-print:hover {
  background: #0d7c47;
}

/* =============================== */
/*        ANIMACIJE ZA DUG         */
/* =============================== */

.dug-anim {
  background: #ffebee !important;
  color: #c62828;
  font-weight: bold;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* =============================== */
/*         LINKOVI / TEKST         */
/* =============================== */

a {
  color: white !important;
  text-decoration: underline;
}



/* Footer uvek vidljiv, ne preklapa */
footer {
  background-color: rgba(0, 0, 0, 0.25);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: auto;
}

/* Za stranice koje koriste .container dodatno centriranje */
.container {
  max-width: 1100px;
  margin: 0 auto;
  background: transparent;
  padding: 10px;
}

/* Sprečava da footer-right izađe iz viewport-a */
.app-footer {
  box-sizing: border-box;
}

.footer-right {
  text-align: right;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* ako ipak pređe, dodaće "…" */
}
<style>
/* === ANIMACIJE HEADER & FOOTER === */
@keyframes fadeInSoft {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUpSoft {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
header, .app-footer {
  opacity: 0;
  animation-fill-mode: forwards;
}
header.fade-in {
  animation: fadeInSoft 0.8s ease-out forwards;
}
.app-footer.fade-in {
  animation: fadeInUpSoft 0.8s ease-out forwards;
}
/* =============================== */
/*   HEADER - PROZIRAN + JEDAN RED */
/* =============================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background: rgba(54, 74, 160, 0.45);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  overflow-x: auto;         /* ako ne stane sve — pojavi se horizontalni scroll */
  white-space: nowrap;      /* sprečava prelazak u drugi red */
  scrollbar-width: none;    /* sakrij scrollbar u Firefoxu */
}
header::-webkit-scrollbar { display: none; }

.nav-bar {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  padding: 6px 10px;
  gap: 6px;
}

.nav-bar ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-bar li { display: inline-block; }

.nav-bar li a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  color: #f0f0ff;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.3s ease;
}

.nav-bar li a:hover {
  background: rgba(255,255,255,0.2);
}

.nav-bar li a.active {
  background: rgba(255,255,255,0.25);
  color: #ffd700;
  box-shadow: 0 0 8px rgba(255,215,0,0.5);
  animation: glowActive 1.2s ease-out forwards;
}

@keyframes glowActive {
  0%   { box-shadow: 0 0 0 rgba(255,215,0,0); }
  40%  { box-shadow: 0 0 12px rgba(255,215,0,0.9); }
  100% { box-shadow: 0 0 8px rgba(255,215,0,0.5); }
}

.nav-bar li a.logout {
  color: #ff8080;
}

header.scrolled {
  background: rgba(54, 74, 160, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/*body {
  margin: 0;
  padding-top: 52px; /* sprečava preklapanje sadržaja */
}*/
.icon-user {
  filter: brightness(200%);
  color: #fff;         /* bela boja */
  margin-right: 6px;   /* malo razmaka od teksta */
  font-size: 1.1em;    /* možeš povećati ako želiš veću ikonu */
  vertical-align: middle;
}


/* 1. Onemogući horizontalno širenje stranice 
html, body {
  overflow-x: hidden !important;
}*/

/* 8. Bela ikonica u footeru */
.footer-left .user-icon {
  color: #fff;
  filter: brightness(250%);
}
/* ========================================= */
/*     AUTOMATSKO PRILAGOĐAVANJE TABELA      */
/* ========================================= */

/* 3. Tekst i brojevi da se lepo lome ako su predugački */
table td, table th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4. Input polja u tabelama zauzimaju širinu ćelije, ne šire tabelu */
table td input[type="text"],
table td input[type="number"],
table td input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #999;
}

/* 5. Dugmad manja i u jednom redu */
table td a, table td button {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  margin: 0 2px;
  white-space: nowrap;
}

/* 6. Ako tabela i dalje ima previše kolona, dozvoli horizontalni scroll */
      samo u okviru kontejnera (ne na celom ekranu) 
.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

/* 7. Footer uvek ide punom širinom */
footer, .app-footer {
  width: 100%;
  left: 0;
  right: 0;
}
/* === SAMO UKLANJANJE HORIZONTALNOG SKROLA === 
html, body {
  overflow-x: hidden !important; /* sprečava pojavu horizontalnog skrola */
  width: 100%;
  max-width: 100vw;
} */


/* =============================== */
/*   TRAJNO UKLANJANJE SKROLA      */
/* =============================== */

/* 1️⃣ Sve elemente računaj unutar box modela 
*, *::before, *::after {
  box-sizing: border-box;
} */

/* 2️⃣ Nikad ne dozvoli da išta probije širinu prozora 
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}*/


/* 6️⃣ Footer uvek tačno 100% i bez pomeranja */
footer, .app-footer {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}
/* ==================================== */
/* === Specifično za tabelu rashoda === */
/* ==================================== */
.tabela-rashodi {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-rashodi th:first-child,
.tabela-rashodi td:first-child {
  width: 50px;
  text-align: center;
}

/* kolona Primalac */
.tabela-rashodi th:nth-child(2),
.tabela-rashodi td:nth-child(2) {
  width: 28%;
  text-align: left;
}

/* kolona Izvod */
.tabela-rashodi th:nth-child(3),
.tabela-rashodi td:nth-child(3) {
  width: 10%;
  text-align: center;
}

/* kolona Datum */
.tabela-rashodi th:nth-child(4),
.tabela-rashodi td:nth-child(4) {
  width: 12%;
  text-align: center;
}

/* kolona Iznos */
.tabela-rashodi th:nth-child(5),
.tabela-rashodi td:nth-child(5) {
  width: 10%;
  text-align: right;
  padding-right: 10px;
}

/* kolona Akcije */
.tabela-rashodi th:last-child,
.tabela-rashodi td:last-child {
  width: 20%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-rashodi td:last-child input[type="checkbox"],
.tabela-rashodi td:last-child button {
  vertical-align: middle;
}
/* ==================================== */
/* === Specifično za tabelu stanje === */
/* ==================================== */
.tabela-stanje {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-stanje th:first-child,
.tabela-stanje td:first-child {
  width: 2%;
  text-align: center;
}

/* kolona Klijent */
.tabela-stanje th:nth-child(2),
.tabela-stanje td:nth-child(2) {
  width: 28%;
  text-align: left;
}

/* kolona Izvod */
.tabela-stanje th:nth-child(3),
.tabela-stanje td:nth-child(3) {
  width: 4%;
  text-align: center;
}

/* kolona Faktura */
.tabela-stanje th:nth-child(4),
.tabela-stanje td:nth-child(4) {
  width: 4%;
  text-align: center;
}

/* kolona Uplata */
.tabela-stanje th:nth-child(5),
.tabela-stanje td:nth-child(5) {
  width: 5%;
  text-align: center;
}
/* kolona datum */
.tabela-stanje th:nth-child(6),
.tabela-stanje td:nth-child(6) {
  width: 4%;
  text-align: right;
  padding-right: 10px;
}

/* kolona Akcije */
.tabela-stanje th:last-child,
.tabela-stanje td:last-child {
  width: 8%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-stanje td:last-child input[type="checkbox"],
.tabela-stanje td:last-child button {
  vertical-align: middle;
}
/* ==================================== */
/* === Specifično za tabelu stanje2 === */
/* ==================================== */
.tabela-stanje2 {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-stanje2 th:first-child,
.tabela-stanje2 td:first-child {
  width: 2%;
  text-align: center;
}

/* kolona Klijent */
.tabela-stanje2 th:nth-child(2),
.tabela-stanje2 td:nth-child(2) {
  width: 25%;
  text-align: left;
}

/* kolona faktura */
.tabela-stanje2 th:nth-child(3),
.tabela-stanje2 td:nth-child(3) {
  width: 5%;
  text-align: center;
}

/* kolona usluga */
.tabela-stanje2 th:nth-child(4),
.tabela-stanje2 td:nth-child(4) {
  width: 5%;
  text-align: center;
}

/* kolona iznos */
.tabela-stanje2 th:nth-child(5),
.tabela-stanje2 td:nth-child(5) {
  width: 5%;
  text-align: center;
}
/* kolona datum */
.tabela-stanje2 th:nth-child(6),
.tabela-stanje2 td:nth-child(6) {
  width: 5%;
  text-align: right;
  padding-right: 10px;
}
/* kolona status */
.tabela-stanje2 th:nth-child(7),
.tabela-stanje2 td:nth-child(7) {
  width: 4%;
  text-align: right;
  padding-right: 10px;
}
/* kolona Akcija */
.tabela-stanje2 th:last-child,
.tabela-stanje2 td:last-child {
  width: 5%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-stanje2 td:last-child input[type="checkbox"],
.tabela-stanje2 td:last-child button {
  vertical-align: middle;
}

/* ==================================== */
/* === Specifično za tabelu csv === */
/* ==================================== */
.tabela-csv {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-csv th:first-child,
.tabela-csv td:first-child {
  width: 3%;
  text-align: center;
}

/* kolona Fajl */
.tabela-csv th:nth-child(2),
.tabela-csv td:nth-child(2) {
  width: 11%;
  text-align: left;
}

/* kolona Firma */
.tabela-csv th:nth-child(3),
.tabela-csv td:nth-child(3) {
  width: 10%;
  text-align: center;
}

/* kolona Faktura */
.tabela-csv th:nth-child(4),
.tabela-csv td:nth-child(4) {
  width: 5%;
  text-align: center;
}

/* kolona Status */
.tabela-csv th:nth-child(5),
.tabela-csv td:nth-child(5) {
  width: 5%;
  text-align: center;
}
/* kolona Iznos */
.tabela-csv th:nth-child(6),
.tabela-csv td:nth-child(6) {
  width: 6%;
  text-align: right;
  padding-right: 10px;
}
/* kolona Datum */
.tabela-csv th:nth-child(7),
.tabela-csv td:nth-child(7) {
  width: 5%;
  text-align: right;
  padding-right: 10px;
}/* kolona Valuta */
.tabela-csv th:nth-child(8),
.tabela-csv td:nth-child(8) {
  width: 3%;
  text-align: right;
  padding-right: 10px;
}/* kolona Poveži */
.tabela-csv th:nth-child(9),
.tabela-csv td:nth-child(9) {
  width: 20%;
  text-align: right;
  padding-right: 10px;
}
/* kolona Akcija */
.tabela-csv th:last-child,
.tabela-csv td:last-child {
  width: 4%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-csv td:last-child input[type="checkbox"],
.tabela-csv td:last-child button {
  vertical-align: middle;
}


/* === Specifično za tabelu klijenti === */
.tabela-klijenti {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-klijenti th:first-child,
.tabela-klijenti td:first-child {
  width: 2%;
  text-align: center;
}

/* kolona Klijent */
.tabela-klijenti th:nth-child(2),
.tabela-klijenti td:nth-child(2) {
  width: 28%;
  text-align: left;
}

/* kolona Email */
.tabela-klijenti th:nth-child(3),
.tabela-klijenti td:nth-child(3) {
  width: 10%;
  text-align: left;
}

/* kolona Telefon */
.tabela-klijenti th:nth-child(4),
.tabela-klijenti td:nth-child(4) {
  width: 8%;
  text-align: left;
}

/* kolona Adresa */
.tabela-klijenti th:nth-child(5),
.tabela-klijenti td:nth-child(5) {
  width: 15%;
  text-align: left;
  padding-right: 10px;
}

/* kolona PIB */
.tabela-klijenti th:nth-child(6),
.tabela-klijenti td:nth-child(6) {
  width: 6%;
  text-align: left;
  padding-right: 10px;
}
/* kolona MB */
.tabela-klijenti th:nth-child(7),
.tabela-klijenti td:nth-child(7) {
  width: 6%;
  text-align: left;
  padding-right: 10px;
}
/* kolona Popust */
.tabela-klijenti th:nth-child(8),
.tabela-klijenti td:nth-child(8) {
  width: 2%;
  text-align: left;
  padding-right: 10px;
}
/* kolona Napomena */
.tabela-klijenti th:nth-child(9),
.tabela-klijenti td:nth-child(9) {
  width: 8%;
  text-align: left;
  padding-right: 10px;
}

/* kolona Akcija */
.tabela-klijenti th:last-child,
.tabela-klijenti td:last-child {
  width: 12%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-klijenti td:last-child input[type="checkbox"],
.+10tabela-klijenti td:last-child button {
  vertical-align: middle;
}

/* === Specifično za tabelu zaduzenje === */
.tabela-zaduzenje {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-zaduzenje th:first-child,
.tabela-zaduzenje td:first-child {
  width: 2%;
  text-align: center;
}

/* kolona Datum */
.tabela-zaduzenje th:nth-child(2),
.tabela-zaduzenje td:nth-child(2) {
  width: 5%;
  text-align: left;
}

/* kolona Faktura */
.tabela-zaduzenje th:nth-child(3),
.tabela-zaduzenje td:nth-child(3) {
  width: 5%;
  text-align: left;
}

/* kolona Valuta */
.tabela-zaduzenje th:nth-child(4),
.tabela-zaduzenje td:nth-child(4) {
  width: 5%;
  text-align: left;
}

/* kolona Usluga */
.tabela-zaduzenje th:nth-child(5),
.tabela-zaduzenje td:nth-child(5) {
  width: 8%;
  text-align: left;
  padding-right: 10px;
}

/* kolona Količina */
.tabela-zaduzenje th:nth-child(6),
.tabela-zaduzenje td:nth-child(6) {
  width: 2%;
  text-align: left;
  padding-right: 10px;
}
/* kolona Cena */
.tabela-zaduzenje th:nth-child(7),
.tabela-zaduzenje td:nth-child(7) {
  width: 8%;
  text-align: left;
  padding-right: 10px;
}
/* kolona Iznos */
.tabela-zaduzenje th:nth-child(8),
.tabela-zaduzenje td:nth-child(8) {
  width: 8%;
  text-align: left;
  padding-right: 10px;
}
/* kolona status */
.tabela-zaduzenje th:nth-child(9),
.tabela-zaduzenje td:nth-child(9) {
  width: 4%;
  text-align: left;
  padding-right: 10px;
}

/* kolona Akcija */
.tabela-zaduzenje th:last-child,
.tabela-zaduzenje td:last-child {
  width: 14%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-zaduzenje td:last-child input[type="checkbox"],
.+10tabela-zaduzenje td:last-child button {
  vertical-align: middle;
}

/* =============================== */

/* === Specifično za tabelu usluge === */
.tabela-usluge {
  width: 80%;
  border-collapse: collapse;
  table-layout: fixed; /* stabilne širine kolona */
  margin-top: 15px;
}

/* kolona # */
.tabela-usluge th:first-child,
.tabela-usluge td:first-child {
  width: 2%;
  text-align: center;
}

/* kolona Usluga */
.tabela-usluge th:nth-child(2),
.tabela-usluge td:nth-child(2) {
  width: 15%;
  text-align: left;
}

/* kolona Cena */
.tabela-usluge th:nth-child(3),
.tabela-usluge td:nth-child(3) {
  width: 6%;
  text-align: left;
}

/* kolona Trajanje */
.tabela-usluge th:nth-child(4),
.tabela-usluge td:nth-child(4) {
  width: 6%;
  text-align: left;
}

/* kolona Akcija */
.tabela-usluge th:last-child,
.tabela-usluge td:last-child {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

/* izgled dugmića i checkbox */
.tabela-usluge td:last-child input[type="checkbox"],
.+10tabela-usluge td:last-child button {
  vertical-align: middle;
}

/* ako koristiš .tabela-rashodi */
.tabela-rashodi th:nth-child(4),
.tabela-rashodi td:nth-child(4) {
  width: 140px;
  text-align: center;
}
/* ======================================= */
/*         AUTOCOMPLETE – GLOBAL STYLE      */
/* ======================================= */

.usluga-row {
  position: relative;
  margin-bottom: 8px;
}

/* Glavni kontejner liste predloga */
.predlozi {
  position: absolute;
  top: calc(100% + 4px); /* dodatni razmak da se prvi red uvek vidi */
  left: 0;
  background: rgba(255, 255, 255, 0.97);
  color: #000;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  width: 250px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #ccc;

  /* Animacija pojavljivanja */
  opacity: 0;
  transform: translateY(-6px);
  animation: fadeInPredlog 0.25s ease-out forwards;
}

/* Svaka stavka */
.predlozi div {
  padding: 7px 10px;
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

/* Hover i aktivna stavka (tastaturna navigacija) */
.predlozi div:hover,
.predlozi div.active {
  background: #2b7cff;
  color: #fff;
  cursor: pointer;
  padding-left: 12px;
  border-left: 3px solid #0040ff; /* vizuelni pokazatelj aktivne stavke */
}

/* Glatko pojavljivanje liste */
@keyframes fadeInPredlog {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll traka */
.predlozi::-webkit-scrollbar {
  width: 6px;
}
.predlozi::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}
.predlozi::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* ✅ Opcionalno: manje širine na manjim ekranima */
@media (max-width: 1200px) {
  .content {
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .content {
    max-width: 95%;
  }
}

/* ✅ Stilizacija svih SELECT (drop box) elemenata */
select {
  min-width: 180px;              /* osnovna širina */
  padding: 4px 10px;             /* unutrašnji razmak */
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f8f8f8;
  color: #000;
  font-size: 12px;
  margin-right: 10px;            /* razmak između selektora */
  appearance: auto;              /* prikaži standardnu strelicu */
}

</style>

<script>
window.addEventListener('scroll', () => {
  const header = document.querySelector('header');
  if (window.scrollY > 10) header.classList.add('scrolled');
  else header.classList.remove('scrolled');
});

window.addEventListener('load', () => {
  const header = document.querySelector('header');
  const footer = document.querySelector('.app-footer');
  if (header) header.classList.add('fade-in');
  if (footer) footer.classList.add('fade-in');
});
</script>
