:root {
  --sidebar-w: 300px;
  --gap: 12px;
  --section-bg: #ececec;
  --section-border: #5e6368;
  --header-bg: #98a4ac;
  --input-bg: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #222;
}

/* Login Screen */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #2f86e6, #1e5fb0);
}

.login-form {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
}

.login-form h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.login-form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.login-form button {
  width: 100%;
  padding: 12px;
  background: #2f86e6;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

/* App Layout */
.app {
  display: flex;
  height: calc(100vh - 60px); /* Oduzmi visinu navbara */
  margin-top: 60px; /* Visina navbara */
  overflow: hidden;
}

/* Mobile Menu */
/* ===== CMR SIDEBAR DRAWER ===== */
/* Desktop: sidebar je fixed lijevo, uvijek vidljiv */
.cmr-sidebar-drawer {
  position: fixed;
  top: 60px;
  left: 0;
  width: var(--sidebar-w, 300px);
  height: calc(100vh - 60px);
  z-index: 10;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Mobile: drawer koji se sklanja lijevo i otvara na FAB klik */
@media (max-width: 1000px) {
  .cmr-sidebar-drawer {
    width: 280px !important;
    z-index: 1045 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }
  .cmr-sidebar-drawer.open {
    transform: translateX(0) !important;
  }
}

/* FAB dugme za otvaranje sidebara na mobilnom */
.sidebar-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2f86e6, #1a6bc4);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 1050;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.sidebar-fab:active {
  transform: scale(0.92);
}

/* Overlay za zatvaranje sidebara klikom izvan */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
}
.sidebar-overlay.open {
  display: block;
}

/* Legacy - ostaje skriveno */
.mobile-menu-btn { display: none !important; }
.mobile-menu { display: none !important; }

/* Sidebar */
.side-nav {
  width: var(--sidebar-w);
  background: #2f86e6;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.cmd {
  width: 100%;
  background: linear-gradient(#e6f3ff, #bfe1ff);
  border: 1px solid rgba(0, 0, 0, 0.12);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b2f5a;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  padding: 8px;
  font-size: 16px;
}

.cmd.archive {
  background: linear-gradient(#f0f7fb, #d6eefb);
}

.side-bottom {
  margin-top: auto;
  width: 100%;
}

.close-btn {
  width: 100%;
  background: linear-gradient(#fff, #e6e6e6);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  color: #0b2f5a;
  font-size: 16px;
}

/* Main Content */
.main {
  flex: 1;
  background: #f6f7f8;
  padding: 18px;
  overflow: auto;
  margin-left: var(--sidebar-w, 300px);
}

@media (max-width: 1000px) {
  .main {
    margin-left: 0 !important;
  }
}

/* Top Controls */
.top-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.plan-selector,
.cmr-controls,
.data-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cmr-controls {
  margin-left: auto;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 65% 25%; /* Lijeva kolona 65%, desna 35% */
  gap: var(--gap);
  align-items: start;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goods-section {
margin-top: 20px;
  grid-column: 1 / span 2;
  width: 100%;
  margin-right: 1cm;
  width: 90%;
  margin-bottom: 20px;
}
/* Sections u lijevoj koloni - malo suženje */
.left-col .section {
margin-left: 1cm;
  max-width: 80%;
}
/* Sections u desnoj koloni - ostanu iste */
.right-col .section {
  max-width: 80%;
}

/* Sections */
.section {
  background: var(--section-bg);
  border: 1px solid var(--section-border);
  padding: 15px;
  border-radius: 4px;
  position: relative;
}

.section .title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  color: #111;
  padding-bottom: 5px;
  border-bottom: 1px solid #ccc;
}

.cmr-number {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2f86e6;
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
}

/* Inputs */
input[type="text"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #b9b9b9;
  background: var(--input-bg);
  font-size: 13px;
  border-radius: 4px;
  margin-bottom: 8px;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* Horizontal Layout */
.horizontal {
  display: flex;
  gap: 8px;
}

.horizontal > * {
  flex: 1;
}

/* Goods Table */
.goods-wrap {
  background: #fff;
  border: 1px solid #9b9b9b;
  padding: 0;
  border-radius: 4px;
}

.goods-header {
  background: var(--header-bg);
  color: #fff;
  padding: 8px;
  font-weight: 700;
  font-size: 14px;
}

.goods-content {
  padding: 8px;
}

.goods-controls {
  display: flex;
  gap: 8px;
  padding: 8px;
  align-items: center;
}

.table-container {
  overflow: auto;
}

.goods-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

/* Desno poravnanje za brojčana polja */
.right-align {
  text-align: left; /* 🔴 PROMIJENI U LEFT */
  direction: ltr; /* 🔴 OSIGURAJ LTR DIRECTION */
}

.goods-table input.right-align {
    text-align: right;
    font-family: monospace;
    direction: rtl; /* Osigurava da decimalna točka bude na desnoj strani */
}

/* Stil za placeholder u desno poravnatim poljima */
.goods-table input.right-align::placeholder {
    text-align: right;
    direction: rtl;
}

.goods-table th {
  background: #6f7579;
  color: #fff;
  padding: 8px;
  border: 1px solid #9b9b9b;
  text-align: left;
}

.goods-table td {
  border: 1px solid #d0d0d0;
  padding: 6px;
  vertical-align: top;
}

.goods-table input {
  width: 100%;
  border: none;
  padding: 4px;
  font-size: 13px;
  background: transparent;
}

.right-align {
  text-align: right;
}

.totals {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 6px 8px;
  font-weight: 700;
}

/* Buttons */
.buttons {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.btn.save {
  background: #0b63d3;
  color: #fff;
}

.btn.update {
  background: #ffc107;
  color: #000;
}

.btn.delete {
  background: #dc3545;
  color: #fff;
}

.btn.clear {
  background: #6b6f73;
  color: #fff;
}

.btn.ghost {
  background: #fff;
  border: 1px solid #9b9b9b;
  color: #222;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.btn.favorite {
    background: linear-gradient(135deg, #ffd700, #ffed4e); /* Žuta gradijent */
    color: #8c6d1f; /* Tamnija žuta za bolju čitljivost */
    border: 1px solid #e6c200;
    padding: 6px 12px;
    font-size: 12px;
    width: auto; /* PROMJENA: umjesto 100% */
    display: inline-block; /* PROMJENA: da se prilagodi širini sadržaja */
    margin-top: 5px;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    min-width: 120px; /* PROMJENA: fiksna minimalna širina */
    text-align: center;
}

.btn.favorite:hover {
    background: linear-gradient(135deg, #ffed4e, #ffd700);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.btn.favorite:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
}

/* Quick Select */
.quick-select-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* CMR Counter */
.cmr-counter {
  font-weight: bold;
  color: #0b63d3;
  background: #e6f3ff;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #0b63d3;
}

.cmr-input {
  width: 120px !important;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  background: #ffffcc !important;
  border: 2px solid #0b63d3 !important;
}

/* Archive */
/* Archive Container - samo ga prikažemo ispod, ne sakrivamo formu */
.archive-container {
    display: none; /* Početno sakriven */
    margin-top: 30px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    width: 100%;
}

.archive-container.active {
    display: block; /* Prikaži kada je aktivna */
}

/* Osiguraj da footer ostane na dnu */
.main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
}

.new-footer {
    margin-top: auto;
}

/* Poboljšan izgled arhive kada je prikazana */
.archive-container.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Osiguraj da forma i arhiva imaju dovoljno prostora */
.form-grid, .goods-section, .bottom-section {
    margin-bottom: 20px;
}

.archive-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 600px; /* Fiksna visina za container */
}

/* Fiksno zaglavlje pretrage */
.archive-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 20;
  padding: 12px;
  margin: -12px -12px 12px -12px;
  border-bottom: 2px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-container {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #2f86e6;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

/* Scrollabilna tabela */
.archive-table-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.archive-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.archive-table thead {
  position: sticky;
  top: 0;
  background: #6f7579;
  z-index: 15;
}

.archive-table th {
  padding: 12px 8px;
  text-align: left;
  color: white;
  border: 1px solid #5e6368;
  font-size: 12px;
  font-weight: bold;
  background: #6f7579;
}

.archive-table td {
  padding: 10px 8px;
  border: 1px solid #dee2e6;
  font-size: 12px;
  vertical-align: middle;
  background: white;
}

.archive-table tbody tr:nth-child(even) td {
  background-color: #f8f9fa;
}

.archive-table tbody tr:hover td {
  background-color: #e3f2fd;
}

.archive-table .btn {
  padding: 4px 8px;
  font-size: 11px;
  margin: 1px;
}

.archive-table .btn.ghost {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #ced4da;
  color: #495057;
}

.archive-table .btn.delete {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: 1px solid #bd2130;
}

/* Checkbox styling */
.archive-table input[type="checkbox"] {
  transform: scale(1.1);
  cursor: pointer;
}

/* Stil za akcije ćeliju */
.archive-table td:last-child {
  white-space: nowrap;
}

/* Responsive za arhivu */
@media (max-width: 768px) {
  .archive-content {
    height: 500px;
    padding: 8px;
  }
  
  .archive-header {
    padding: 8px;
    margin: -8px -8px 8px -8px;
  }
  
  .search-container {
    gap: 6px;
  }
  
  .search-box {
    min-width: unset;
  }
  
  .search-input {
    border-radius: 4px;
    padding: 8px 35px 8px 12px;
    font-size: 13px;
  }
  
  .archive-table {
    font-size: 11px;
  }
  
  .archive-table th {
    padding: 8px 6px;
    font-size: 11px;
  }
  
  .archive-table td {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  .archive-table .btn {
    padding: 3px 6px;
    font-size: 10px;
    margin: 1px 0;
    display: block;
    width: 100%;
  }
  
  .archive-table td:last-child {
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .archive-content {
    height: 400px;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
  }
  
  .archive-table-container {
    overflow-x: auto;
  }
  
  .archive-table {
    min-width: 600px; /* Omogući horizontalni scroll na malim ekranima */
  }
  
  .archive-table th,
  .archive-table td {
    min-width: 80px;
  }
  
  .archive-table td:last-child {
    min-width: 100px;
  }
}




/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.favorite-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.favorite-item:hover {
  background: #f5f5f5;
}

.favorite-item-info {
  flex: 1;
}

.favorite-item-actions {
  display: flex;
  gap: 5px;
}


/* Loading */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1000px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .side-nav {
    display: none;
  }

  .sidebar-fab {
    display: flex !important;
  }

  .bottom-section {
    grid-column: 1;
    width: 100%;
  }

  .goods-section {
    grid-column: 1;
  }

  .main {
    padding: 60px 18px 18px 18px;
  }

  .top-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .cmr-controls {
    margin-left: 0;
    justify-content: center;
  }

  .horizontal {
    flex-direction: column;
  }

  .buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    margin-bottom: 5px;
  }

  .quick-select-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
  }

  .search-container {
    flex-direction: column;
  }

  .search-box {
    min-width: 100%;
  }
}

/* Hover Effects */
.cmd:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

/* Stilovi za prelamanje teksta na zarezima */
.break-on-comma {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Opcionalno: stil za prikaz zareza u novom redu */
.comma-break::after {
  content: ",\A";
  white-space: pre;
}

/* Za input polje sa prelamanjem */
.wrapping-input {
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 60px;
  resize: vertical;
}

/* Osiguraj da su kolone jednake visine */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Goods section ispod obje kolone */
.goods-section {
  grid-column: 1 / -1;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Stilovi za textarea polja */
.wrapping-input {
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 60px;
  resize: vertical;
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.character-count {
  text-align: right;
  font-size: 0.8rem;
  color: #666;
  margin-top: 5px;
}

/* Novi stilovi za sužene kolone */
.narrow-section {
  max-width: 500px;
}

.narrow-section input,
.narrow-section textarea,
.narrow-section select {
  max-width: 100%;
}

/* Stilovi za desnu kolonu */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Stilovi za lijevu kolonu */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Override za sekcije unutar bottom-row (ne vrijedi margin/max-width iz left-col .section) */
.bottom-row .left-col .section {
  margin-left: 0;
  max-width: 100%;
}

/* Bottom row - drži lijevu (rubrike 9,10,11) i napomenu zajedno */
/* Iste dimenzije kao .goods-section da se ivice poravnaju */
.bottom-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  width: 90%;
  margin-right: 1cm;
}

.bottom-row .left-col {
  flex: 0 0 65%;
  min-width: 0;
}

.napomena-col {
  flex: 1;
  min-width: 0;
}

.napomena-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.napomena-section textarea {
  flex: 1;
  resize: vertical;
  min-height: 120px;
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}


/* Bottom section - samo lijeva kolona */
.bottom-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Stilovi za weight checkbox */
.goods-table th input[type="checkbox"] {
  transform: scale(0.8);
  cursor: pointer;
}

.goods-table th label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 700;
}

/* ========== NOVI STILOVI ZA SECTION HEADER ========== */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

.section-header .cmr-number {
    position: static;
    background: #2f86e6;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    transform: none;
}

.section-header .title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}

/* Mali button za odabir */
.btn.ghost.small {
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
}

/* Goods section header */
.goods-wrap .section-header {
    background: var(--header-bg);
    color: #fff;
    padding: 8px;
    margin-bottom: 0;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.goods-wrap .section-header .cmr-number {
    background: rgba(255, 255, 255, 0.2);
}

.goods-wrap .section-header .goods-header {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn.ghost.small {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Vrlo kompaktan stil */
.section-header.compact {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

.section-header.compact .cmr-number {
    background: #2f86e6;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
}

.section-header.compact .title {
    margin: 0;
    border: none;
    padding: 0;
    font-weight: 700;
    font-size: 14px;
    color: #111;
    white-space: nowrap;
}

.section-header.compact .btn.ghost.small {
    padding: 2px 6px;
    font-size: 10px;
    margin-left: 2px;
}


/* ========== UNIFIED DATE PICKER STYLES ========== */
.date-input-wrapper {
    position: relative;
    width: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.date-display {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border: 1px solid #b9b9b9;
    background: var(--input-bg);
    font-size: 13px;
    border-radius: 4px;
    text-align: center;
    font-family: monospace;
    cursor: pointer;
}

.date-display:focus {
    border-color: #2f86e6;
    outline: none;
}

.date-picker-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    color: #666;
}

.date-picker-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Stil za native date input kada je vidljiv */
.date-input-wrapper input[type="date"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.date-input-wrapper input[type="date"].visible {
    opacity: 1;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .date-input-wrapper {
        width: 140px;
    }
    
    .date-display {
        font-size: 12px;
        padding: 6px 30px 6px 8px;
    }
    
    .date-picker-btn {
        font-size: 14px;
        right: 4px;
    }
}


/* ========== NOVI FOOTER DIZAJN ========== */
.new-footer {
  background-color: #2d3748; /* Zadana tamna pozadina */
  color: #e2e8f0;
  padding: 3rem 1rem 1.5rem;
  margin-top: 4rem;
  font-family: Arial, sans-serif;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

.footer-logo-area .footer-logo {
  width: 180px;
  height: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  text-align: left;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-link {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.footer-link.icon-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-link.icon-link .icon {
  font-size: 1.1rem;
  color: #4a5568;
  transition: color 0.3s ease;
}

.footer-link.icon-link:hover .icon {
  color: #ffffff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #4a5568;
  text-align: center;
  font-size: 0.85rem;
  color: #718096;
}

/* Responsive za novi footer */
@media (max-width: 768px) {
  .footer-links-grid {
    grid-template-columns: 1fr; /* Jedan stupac na manjim ekranima */
    text-align: center;
    gap: 2.5rem;
  }

  .footer-link.icon-link {
    justify-content: center;
  }

  .footer-link:hover {
    transform: none; /* Ukloni animaciju na dodirnim uređajima */
  }
}
/* ========== KRAJ NOVI FOOTER DIZAJN ========== */

/* ========== MODERN SIDEBAR STYLES ========== */
.side-nav {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
  text-align: center;
  padding: 15px 0 25px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 25px;
}

.sidebar-logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.sidebar-subtitle {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu-item {
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.sidebar-menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleY(0);
  transition: transform 0.3s;
}

.sidebar-menu-item:hover {
  background: rgba(102, 126, 234, 0.15);
  transform: translateX(5px);
}

.sidebar-menu-item:hover::before {
  transform: scaleY(1);
}

.sidebar-menu-item.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  border-left: 3px solid #667eea;
}

.sidebar-menu-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-section-title {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 16px 10px;
  font-weight: 600;
}

.side-bottom {
  margin-top: auto;
  width: 100%;
}

.logout-btn {
  margin-top: 30px;
  width: 100%;
  padding: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1000px) {
  .side-nav {
    display: none;
  }
}
/* ========== END MODERN SIDEBAR STYLES ========== */

/* ========== PRINT MODAL STYLES ========== */
.print-modal {
    max-width: 600px;
    text-align: center;
}

.print-modal h2 {
    color: #333;
    margin-bottom: 25px;
}

.print-options,
.print-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.print-option,
.print-option-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.print-option:hover,
.print-option-card:hover {
    transform: translateY(-5px);
    border-color: #2f86e6;
    box-shadow: 0 8px 20px rgba(47, 134, 230, 0.2);
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.print-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.print-option h3,
.print-option-card strong {
    color: #2f86e6;
    margin-bottom: 8px;
    font-size: 18px;
    display: block;
}

.print-option p,
.print-option-card small {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
    display: block;
}

.print-text {
    text-align: center;
}

.print-details {
    font-size: 12px !important;
    color: #999 !important;
    font-style: italic;
}

@media (max-width: 768px) {
    .print-options,
    .print-options-grid {
        grid-template-columns: 1fr;
    }

    .print-modal {
        margin: 20px;
        max-width: 90%;
    }
}


/* ========== MODERN SIDEBAR STYLES ========== */
.side-nav {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  text-align: center;
  padding: 15px 0 25px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 25px;
}

.sidebar-logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.sidebar-subtitle {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-menu-item {
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.sidebar-menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleY(0);
  transition: transform 0.3s;
}

.sidebar-menu-item:hover:not([disabled]) {
  background: rgba(102, 126, 234, 0.15);
  transform: translateX(5px);
}

.sidebar-menu-item:hover:not([disabled])::before {
  transform: scaleY(1);
}

.sidebar-menu-item.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  border-left: 3px solid #667eea;
}

.sidebar-menu-item[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.sidebar-menu-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-section-title {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 16px 10px;
  font-weight: 600;
}

.side-bottom {
  margin-top: auto;
  width: 100%;
  padding-top: 20px;
}

.logout-btn {
  width: 100%;
  padding: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1000px) {
  .side-nav {
    display: none;
  }
}
/* ========== END MODERN SIDEBAR STYLES ========== */

/* ============================================
   DODAJ U style.css (NA KRAJ)
   Admin Badge & Package Badge Stilovi
   ============================================ */

/* Admin Badge */
.admin-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 16px;
    animation: pulse 2s infinite;
    vertical-align: middle;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.15); 
        opacity: 0.8;
    }
}

/* Package Badge u Sidebaru */
.package-badge {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

/* Admin Panel Link Stilovi */
#adminPanelLink {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2d3748;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

#adminPanelLink:hover {
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
    transform: translateX(5px);
}

#adminPanelLink .icon {
    font-size: 20px;
}

/* Sidebar Section Title */
.sidebar-section-title {
    padding: 20px 20px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* Sidebar Menu Item */
.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
    transform: translateX(3px);
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    font-weight: 600;
}

.sidebar-menu-item .icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

/* Login Container Styles */
    .login-container {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10000;
    }

    .login-form {
      background: white;
      padding: 40px;
      border-radius: 10px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
      text-align: center;
      max-width: 400px;
      width: 90%;
    }

    .login-form h2 {
      margin-bottom: 10px;
      color: #2a5298;
    }

    .login-form p {
      margin-bottom: 30px;
      color: #666;
    }

    .btn-primary {
      background: #2a5298;
      color: white;
      border: none;
      padding: 12px 30px;
      border-radius: 5px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.3s;
    }

    .btn-primary:hover {
      background: #1e3c72;
    }

    /* User Controls Styles */
    .user-controls {
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .username-display {
      font-weight: 600;
      color: #2a5298;
    }

    .btn-logout-small {
      background: #dc3545;
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 4px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.3s;
    }

    .btn-logout-small:hover {
      background: #c82333;
    }

    /* Sidebar User Info */
    .sidebar-header .user-info {
      font-size: 12px;
      color: #666;
      margin-top: 5px;
      font-weight: 500;
    }

    /* Loading Spinner */
    .loading-spinner {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid #ffffff;
      border-radius: 50%;
      border-top-color: transparent;
      animation: spin 1s ease-in-out infinite;
      margin-right: 8px;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
    
/* ========== TOAST NOTIFICATIONS - FIXED VERSION ========== */
/* Dodaj ovo NA KRAJ style.css fajla ili zamijeni stare toast stilove */

/* KRITIČNO: Koristi body > .toast da ima veći specificity */
body > .toast {
  /* Reset (ali ne all: initial!) */
  box-sizing: border-box !important;
  margin: 0 !important;
  
  /* Pozicioniranje */
  position: fixed !important;
  top: 20px !important;
  right: -400px !important; /* Počinje van ekrana */
  
  /* Layout */
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  
  /* Dimenzije */
  min-width: 250px !important;
  max-width: 350px !important;
  padding: 16px 24px !important;
  
  /* Vizualni stil */
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  
  /* Tipografija */
  color: white !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  
  /* Animacija i z-index */
  z-index: 999999 !important;
  opacity: 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  
  /* Interakcija */
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Kada se prikaže toast */
body > .toast.show {
  right: 20px !important;
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Success toast - zeleni */
body > .toast.success {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
}

body > .toast.success::before {
  content: '✓' !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
}

/* Error toast - crveni */
body > .toast.error {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

body > .toast.error::before {
  content: '✕' !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
}

/* Warning toast - žuti */
body > .toast.warning {
  background: linear-gradient(135deg, #ffc107, #ff9800) !important;
  color: #212529 !important;
}

body > .toast.warning::before {
  content: '⚠' !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  background: rgba(0, 0, 0, 0.1) !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
}

/* Info toast - plavi */
body > .toast.info {
  background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

body > .toast.info::before {
  content: 'ℹ' !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
}

/* Hover efekat */
body > .toast:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
  transform: translateX(-5px) !important;
}

/* Responsivnost za mobilne */
@media (max-width: 600px) {
  body > .toast {
    right: -100% !important;
    max-width: calc(100% - 20px) !important;
    top: 10px !important;
  }
  
  body > .toast.show {
    right: 10px !important;
  }
}

/* Toast container (ako koristiš #toastContainer) */
#toastContainer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  z-index: 999999 !important;
  pointer-events: none !important;
}

#toastContainer .toast {
  pointer-events: auto !important;
  margin-bottom: 10px !important;
}

/* dodatak za mobilni prikaz */


/* ========================================
   DODAJ OVO U css/style.css
   ======================================== */

/* Full-width select za klijente */
.full-width-select {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  background-color: white;
}

/* Mobilni prikaz - Jednake širine za sve sekcije */
@media (max-width: 768px) {
  
  /* Form grid na mobilu */
  .form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
  }
  
  /* Sve kolone pune širine */
  .col.left-col,
  .col.right-col {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 15px !important;
  }
  
  /* Sekcije */
  .section,
  .left-col .section,
  .right-col .section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 20px !important;
    box-sizing: border-box;
  }
  
  /* Goods section full width */
  .goods-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 15px !important;
    margin: 20px 0 !important;
  }
  
  .goods-wrap {
    width: 100% !important;
  }
  
  /* Bottom row + section */
  .bottom-row {
    flex-direction: column;
    width: 100% !important;
    margin-right: 0 !important;
  }

  .bottom-row .left-col,
  .napomena-col {
    flex: none;
    width: 100% !important;
  }

  .bottom-section {
    width: 100% !important;
    padding: 0 !important;
  }
  
  /* Table container */
  .table-container {
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Goods table */
  .goods-table {
    min-width: 600px; /* Da se može scrollati horizontalno */
  }
  
  /* Controls */
  .goods-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
  }
  
  .goods-controls button {
    flex: 1 1 auto;
    min-width: 120px;
    font-size: 13px;
    padding: 8px 12px;
  }
  
  .weight-toggle {
    flex-basis: 100%;
    margin-top: 5px;
  }
  
  /* Totals */
  .totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 4px;
    margin-top: 10px;
  }
  
  .totals div {
    font-size: 14px;
    font-weight: 600;
  }
  
  /* Input polja */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Horizontal group na mobilu */
  .horizontal {
    display: flex;
    gap: 10px;
    width: 100%;
  }
  
  .horizontal input,
  .horizontal select {
    flex: 1;
  }
  
  /* Section headers */
  .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
  }
  
  .section-header .title {
    flex: 1;
    min-width: 150px;
  }
  
  .section-header button {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  /* Client info box */
  #clientInfo {
    width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Vehicle info box */
  #vehicleInfo {
    width: 100% !important;
    box-sizing: border-box;
  }
  
  /* CMR Controls na vrhu */
  .top-controls {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }
  
  .cmr-controls {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .cmr-input {
    flex: 1;
    min-width: 120px;
  }
  
  .user-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* Tablet prikaz (iPad) */
@media (min-width: 769px) and (max-width: 1024px) {
  .goods-section {
    width: 100%;
    max-width: 100%;
  }
  
  .col.left-col {
    width: 100%;
  }
}

/* Desktop - sve normalno */
@media (min-width: 1025px) {
  .goods-section {
    grid-column: 1 / -1; /* Uzima punu širinu grid-a */
  }
}


.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #212529;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #e0e0e0;
  color: #000;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.vehicle-item {
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.vehicle-item:hover {
  background: #f8f9fa;
  border-color: #007bff;
  transform: translateX(5px);
}

.vehicle-item:active {
  transform: scale(0.98);
}

/* Animacije */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsivnost */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
}


/* ========== POST-SAVE MODAL - ACTION CARDS ========== */
.action-card {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
    text-align: left;
}

.action-card:hover {
    background: #f8f9fa;
    border-color: #0066cc;
    transform: translateX(4px);
}

.action-card:active {
    transform: translateX(2px);
}

.action-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
}

.action-text {
    flex: 1;
}

.action-text strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.action-text small {
    display: block;
    font-size: 13px;
    color: #666;
}

.action-arrow {
    font-size: 24px;
    color: #999;
    transition: transform 0.2s;
}

.action-card:hover .action-arrow {
    transform: translateX(4px);
    color: #0066cc;
}

@keyframes flashHighlight {
    0%, 100% { background: transparent; }
    50% { background: #fff3cd; }
}

.highlight-flash {
    animation: flashHighlight 1s ease 3;
    border-left: 4px solid #ffc107 !important;
}

/* ========== MODERN BUTTON STYLES ========== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:active {
    transform: scale(0.96);
}

.btn-modern .btn-icon {
    font-size: 20px;
    transition: transform 0.3s;
}

.btn-modern:hover .btn-icon {
    transform: scale(1.2);
}

.btn-modern .btn-text {
    position: relative;
    z-index: 1;
}

/* Cancel Button */
.btn-modern.btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-modern.btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    transform: translateY(-2px);
}

/* Primary Button (Snimi kao novi) */
.btn-modern.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-modern.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Success Button (Ažuriraj) */
.btn-modern.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.btn-modern.btn-success:hover {
    background: linear-gradient(135deg, #4a9428 0%, #8ec653 100%);
    box-shadow: 0 6px 16px rgba(86, 171, 47, 0.4);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-modern {
        min-width: 120px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn-modern {
        width: 100%;
    }
}