:root {
    --primary-color: #4e73df;
    --primary-hover: #3a5fcf;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --border-color: #e3e6f0;
    --sidebar-bg: #fff;
    --sidebar-text: #333;
    --input-bg: #fff;

    --zelena: #4CAF50;
    --zuta: #ff9800;
    --crvena: #f44336;
    --plava: #2196F3;
    --siva_svetlo: #f1f1f1;
    --siva_tamno: #616161;
    --rezedo: #009688;
}

[data-theme="dark"] {
    --primary-color: #4e73df;
    --primary-hover: #3a5fcf;
    --secondary-color: #6c757d;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --light-color: #343a40;
    --dark-color: #d1d3e2;
    --text-color: #f8f9fa;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --sidebar-bg: #252525;
    --sidebar-text: #f8f9fa;
    --input-bg: #3d3d3d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s;
}
html {
  font-size: 15px;
  scroll-behavior: smooth;
}
body {
  font-size: 15px;
  margin: 0;
  border: 0;
  padding: 0;
  position: absolute;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-areas:
    "header header"
    "nav main";
  grid-template-columns: 250px 1fr;
  grid-template-rows: 70px 1fr;
  gap: 0px;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}
header {
  grid-area: header;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: left;
  align-items: center;
  gap: 20px;
  padding: 10px 2rem;
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  overflow-y: none;
}
header img {
  height: 100%;
}
header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
header nav {
  overflow-y: auto;
  width: auto;
  background-color: inherit;
  padding: 0;
  border-right: 0;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}
header nav::-webkit-scrollbar {
  display: none;
}
header nav a.aktivno {
  background-color: color-mix(in srgb, var(--sidebar-bg), transparent 30%);
  color: var(--text-color);
  font-weight: 500;
}
header nav a:hover {
  background-color: color-mix(in srgb, var(--sidebar-bg), transparent 60%);
  color: var(--text-color);
}
nav {
  overflow-y: auto;
  width: 250px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1rem 1rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
nav::-webkit-scrollbar {
  display: none;
}
nav a {
  background: none;
  border: none;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 0.35rem;
  color: var(--sidebar-text);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
  text-decoration: none;
}
nav a.aktivno {
  background-color: rgba(78, 115, 223, 0.2);
  color: var(--primary-color);
  font-weight: 500;
}
nav a:hover {
  background-color: rgba(78, 115, 223, 0.1);
  color: var(--primary-color);
}
nav section {
  margin-top: auto;
}
main {
  grid-area: main;
  padding: 20px;
  overflow-y: auto;
}
main::-webkit-scrollbar {
  display: none;
}
aside {

}
hr {
  margin: 15px 0;
  border-color: var(--primary-color);
}
fieldset {
  margin: 10px 0;
  padding: 20px;
  border: 2px solid var(--border-color);
}
legend {
  font-size: 1rem;
  font-weight: bold;
  color: var(--secondary-color);
  padding: 0 10px;
}
@media screen and (max-width: 600px) {

}
input[type="text"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="date"],
input[type="url"],
input[type="email"] {
  padding: 0.5rem 1rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--text-color);
  width: 200px;
  font-size: 0.9rem;
}
input[type="number"] {
  min-width: 75px;
}
input[type="url"] {
  min-width: 500px;
}
input[type="email"] {
  min-width: 250px;
}
input[type="search"] {
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="grey" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z"/></svg>');
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 1rem;
}
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
/*
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.5;
}
*/
input[type="date"] {
  position: relative;
  appearance: none;
  padding-right: 30px;
  /* Tvoja nova ikonica (npr. SVG ili PNG) */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="grey" d="M152 64H296V24C296 10.75 306.7 0 320 0C333.3 0 344 10.75 344 24V64H384C419.3 64 448 92.65 448 128V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V128C0 92.65 28.65 64 64 64H104V24C104 10.75 114.7 0 128 0C141.3 0 152 10.75 152 24V64zM48 448C48 456.8 55.16 464 64 464H384C392.8 464 400 456.8 400 448V192H48V448z"/></svg>');
  background-position: right 10px center;
  background-size: 1rem;
  background-repeat: no-repeat;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 2.2rem;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}
input[type="checkbox"] {
  appearance: none;
  background-color: var(--input-bg);
  border-radius: 72px;
  border-style: none;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  height: 22px;
  margin: 0;
  position: relative;
  width: 32px;
  cursor: pointer;
}
input[type="checkbox"]::before {
  bottom: -6px;
  content: "";
  left: -6px;
  position: absolute;
  right: -6px;
  top: -6px;
}
input[type="checkbox"],
input[type="checkbox"]::after {
  transition: all 100ms ease-out;
}
input[type="checkbox"]::after {
  background-color: var(--text-color);
  border-radius: 50%;
  content: "";
  height: 14px;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 14px;
}
input[type="checkbox"]:checked {
  background-color: var(--primary-color);
}
input[type="checkbox"]:checked::after {
  background-color: var(--text-color);
  left: 13px;
}
input[type="checkbox"]:checked:hover {
  background-color: var(--primary-hover);
}
label {
  font-size: 0.9rem;
  color: var(--secondary-color);
}
select {
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: 0.85rem;
  cursor: pointer;
}
select:hover {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}
button {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  border: none;
  border-radius: 0.35rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
button:hover,
button:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-color);
}
textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 0.35rem;
  padding: 0.75rem;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: 0.9rem;
  line-height: 1.5;
}
input[type="text"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="password"]:hover,
input[type="date"]:hover,
input[type=checkbox]:hover,
textarea:hover,
button:hover {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type=checkbox]:focus,
textarea:focus,
button:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}
input[type="text"]:invalid,
input[type="number"]:invalid,
input[type="search"]:invalid,
input[type="password"]:invalid,
input[type="date"]:invalid,
input[type=checkbox]:invalid,
select:invalid,
textarea:invalid {
  border: 2px solid tomato;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal_prozor {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  width: 100%;
  max-width: 500px;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: stretch;
  gap: 10px;
}

.modal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-right: 1rem;
}
.modal .modal_footer {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  margin-top: 30px;
}

.modal .close-btn {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--secondary-color);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
}

.modal .close-btn:hover {
  color: var(--text-color);
}
.box_korisnik {
  display: inline-block;
  position: relative;
  font-family: sans-serif;
  margin-left: auto;
}
.box_korisnik details summary {
  list-style: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 0.35rem;
  color: var(--text-color);
  background-color: color-mix(in srgb, var(--sidebar-bg), transparent 30%);
}
.box_korisnik details summary::-webkit-details-marker {
  display: none;
}
.box_korisnik details summary img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
}
.box_korisnik details section {
  position: absolute;
  top: 110%;
  right: 0;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border-radius: 8px;
  min-width: 200px;
  z-index: 100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.box_korisnik details section a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--primary-color);
  text-decoration: none;
  gap: 10px;
}
.box_korisnik details section a:hover {
  background: #333;
  color: var(--primary);
}
.box_korisnik details section hr {
  margin: 0;
  border: 0;
  border-top: 2px solid #eee;
}
.box_korisnik details section article {
  background: #333;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

.divider { border-top: 1px solid #eee; }
.block { display: block; }
.italic { font-style: italic; font-size: 0.85rem; color: #666; }
table.lista tbody td:nth-child(8) {
  text-align: right;
  width: 5%;
  min-width: 100px;
}
table.lista tbody td:nth-child(1) {
  text-align: right;
  width: 5%;
  min-width: 100px;
}
table.lista tbody td:is(:nth-child(2), :nth-child(3)) {
  text-align: left;
  width: 7.5%;
  min-width: 150px;
}
table.lista tbody td:is(:nth-child(4)) {
  text-align: left;
  width: 20%;
  min-width: 400px;
}
#filter label {
  width: 100px;
  display: inline-block;
  margin: 5px;
}

.tabela {

}
.tabela thead {
  background-color: var(--primary-color);
  color: var(--text-color);
}
.tabela thead th {
  padding: 10px 20px;
}
.tabela tbody tr {
  background-color: var(--bg-color);
}
.tabela tbody tr:nth-child(even) {
  background-color: var(--card-bg);
}
.tabela tbody tr:hover {
  background-color: var(--primary-color);
}
.tabela td {
  padding: 8px 20px;
}
