body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.navbar {
    display: flex;
    justify-content: center;
    background-color: #333;
    padding: 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    color: white;
    z-index: 20000; 
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    transition: color 0.3s, background-color 0.3s;
    margin: 0 0.5rem;
    border-radius: 5px;
}

.navbar a:hover {
    background-color: red;
    color: white;
}

main {
    margin-top: 70px; /* Dodaj padding kako bi se sadržaj pomerio ispod header-a */
    padding: 20px;
}

/* Novi stilovi za sumarni pregled uplata */
.summary {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.summary-item {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.summary-item h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #333;
}

.summary-item p {
    font-size: 1.5rem;
    color: #000;
    font-weight: bold;
}

/* Novi stilovi za kartice sa ključnim informacijama */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-item h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #333;
}

.card-item p {
    font-size: 1.25rem;
    color: #000;
    font-weight: bold;
}

/* Stilovi za formu plaćanja */
.payment-form {
    max-width: 600px;
    margin: auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.payment-form input,
.payment-form select,
.payment-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.submit-button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
}

.submit-button:hover {
    background-color: #45a049;
}

/* Skrivena klasa */
.hidden {
    display: none;
}

/* Stilovi za tabelu */
.payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.payment-table th,
.payment-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.row-even {
    background-color: #f9f9f9;
}

.row-odd {
    background-color: #ffffff;
}

.table-row:hover {
    background-color: #e0f7fa;
}

/* Stilovi za paginaciju */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.pagination span {
    font-weight: bold;
}

/* Opcionalno - stil za select element da odgovara postojećim poljima */
.payment-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.user-info {
    margin-left: 1rem;
    color: #f0f0f0;
    font-size: 0.9rem;
}
.error-border {
    border: 1px solid red;
}

.center-text {
    text-align: center;
}

.client-form {
    max-width: 600px;
    margin: auto;
}

.client-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.client-table th, .client-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.row-even {
    background-color: #f9f9f9;
}

.row-odd {
    background-color: #ffffff;
}

.table-row:hover {
    background-color: #e0f7fa;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* Stilovi za formu klijenata */
.client-form {
    max-width: 600px;
    margin: auto;
}

.client-form input,
.client-form select,
.client-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Dugme za klijent formu koristiće iste stilove kao dugme za plaćanje */
.client-form .submit-button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
}

.client-form .submit-button:hover {
    background-color: #45a049;
}

/* Centriranje naslova */
.center-text {
    text-align: center;
}

.autocomplete-container {
    position: relative; /* Ovo postavlja osnovu za apsolutno pozicioniranje */
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    top: 100%; /* Lista odmah ispod input polja */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000; /* Osigurava da lista bude iznad svih elemenata */
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f0f0f0;
}

.autocomplete-item.no-results {
    text-align: center;
    color: #888;
    pointer-events: none;
}


.reservation-controls {
    margin-bottom: 20px;
}

#calendar {
    max-width: 900px;
    margin: auto;
}

/* style.css */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    position: relative;
}

.close {
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
}

.selected-date {
    background-color: #ffeeba !important;
    border: 2px solid #ffcc00;
    border-radius: 4px;
}

/* Centriranje dugmeta ispod kalendara */
.button-center {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* Stilovi za formu rezervacije */
.reservation-form {
    max-width: 600px;
    margin: auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.reservation-form input,
.reservation-form select,
.reservation-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.submit-button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
}

.submit-button:hover {
    background-color: #45a049;
}

/* Centriranje dugmeta ispod kalendara */
.button-center {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* Stil za manje dugme */
.centered-button {
    width: 200px; /* Postavite željenu širinu */
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    text-align: center;
}

.centered-button:hover {
    background-color: #45a049;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px; /* Razmak između checkbox-ova */
}

.checkbox-label input[type="checkbox"] {
    margin-right: 5px; /* Razmak između checkbox-a i teksta */
}

.reservation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1em;
    text-align: left;
    border: 1px solid #ddd;
}

.reservation-table thead tr {
    background-color: #f4f4f4;
    text-align: left;
    font-weight: bold;
}

.reservation-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.reservation-table tbody tr.row-even {
    background-color: #f9f9f9;
}

.reservation-table tbody tr.row-odd {
    background-color: #ffffff;
}

.reservation-table tbody tr:hover {
    background-color: #f1f1f1;
}

.reservation-table td, .reservation-table th {
    padding: 10px;
}

#no-reservations-message {
    margin-top: 20px;
    font-weight: bold;
}

.reservation-title {
    text-align: center;
    margin-top: 10px;
    font-size: 1.8em; /* Prilagodite veličinu fonta */
    font-weight: bold; /* Naglasite naslov */
}

.radio-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;        /* veći razmak između Company i Individual */
  margin-top: 6px;
}


.radio-label input[type="radio"] {
  transform: scale(1.1);
}



.radio-label input[type="radio"] {
    margin: 0; /* Uklanja dodatni razmak oko dugmeta */
}

.form-group.client-type {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-group.client-type > label {
  margin: 0;
  min-width: 120px;
}


#contract-fields {
    position: relative; /* Roditelj za apsolutno pozicioniranje */
}

#contract-list {
    position: absolute; /* Pozicionira listu u odnosu na najbliži relative roditelj */
    top: 100%; /* Lista počinje odmah ispod input polja */
    left: 0; /* Poravnanje sa leve strane input polja */
    width: 100%; /* Širina jednaka input polju */
    background-color: #fff;
    border: 1px solid #ccc;
    z-index: 1000; /* Lista je iznad ostalih elemenata */
    max-height: 200px;
    overflow-y: auto; /* Scroll za dugacke liste */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    margin: 0; /* Uklanja margine */
    padding: 0;
}

/* === CONTRACT ACTION BUTTONS === */

.btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    margin: 3px 0;
    width: 100%;
}

/* Pause – žuto */
.btn-pause {
    background-color: #f0ad4e;
}
.btn-pause:hover {
    background-color: #ec971f;
}

/* Resume – plavo */
.btn-resume {
    background-color: #5bc0de;
}
.btn-resume:hover {
    background-color: #31b0d5;
}

/* Terminate – crveno */
.btn-terminate {
    background-color: #d9534f;
}
.btn-terminate:hover {
    background-color: #c9302c;
}

/* Delete – sivo */
.btn-delete {
    background-color: #6c757d;
}
.btn-delete:hover {
    background-color: #545b62;
}

/* === STATUS BADGES === */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: lowercase;
}

.badge-active { background-color: #4CAF50; }      /* green */
.badge-paused { background-color: #f0ad4e; }      /* yellow */
.badge-terminated { background-color: #d9534f; }  /* red */
.badge-expired { background-color: #6c757d; }     /* gray */


.dashboard { padding: 20px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.kpi-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.kpi-title { font-size: 12px; color: #666; }
.kpi-value { font-size: 28px; font-weight: 700; margin-top: 6px; }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 16px;
}

.chart-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ===== Public (login) page - TheOfficeBelgrade style ===== */

.public-page {
  min-height: calc(100vh - 70px); /* zbog fiksnog menija */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  padding-top: 80px;
  background: #ffffff;
}


.public-card {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

/* crveni akcent (meta vibe) */
.public-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  width: 100%;
  background: #e31b23; /* crvena */
}

.public-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.public-logo {
  height: 56px;
  width: auto;
  display: block;
}

.public-title {
  margin: 0;
  text-align: center;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #111;
}

.public-subtitle {
  margin: 14px auto 0;
  text-align: center;
  max-width: 560px;
  color: #444;
  font-size: 16px;
  line-height: 1.6;
}

.public-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.public-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(227, 27, 35, 0.35);
  background: #e31b23;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  min-width: 260px;
}

.public-login-btn:hover {
  background: #c9151c;
  box-shadow: 0 10px 18px rgba(227, 27, 35, 0.18);
  transform: translateY(-1px);
}

.public-footnote {
  margin-top: 18px;
  text-align: center;
  color: #777;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
  .public-card { padding: 22px; }
  .public-title { font-size: 30px; }
  .public-logo { height: 46px; }
  .public-login-btn { width: 100%; }
}

/* === CLIENT TYPE BADGES === */
.badge-company {
  background-color: #4CAF50;   /* green */
}

.badge-individual {
  background-color: #5bc0de;   /* blue */
}

.badge-unknown {
  background-color: #999;
}

table {
    width: 100%;
    table-layout: fixed; /* KLJUČNO */
    border-collapse: collapse;
}

th, td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 14px;
}

/* kolona Putanja */
td.path {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.tx-table{
  width: 100%;
  table-layout: auto;          /* kolone se šire koliko treba */
  border-collapse: collapse;  /* pravi grid */
}

/* header */
.tx-table th{
  white-space: nowrap;        /* nema wrap-a u headeru */
  background: #f3f3f3;
  font-weight: 600;
}

/* ćelije + header */
.tx-table th,
.tx-table td{
  border: 1px solid #999;
  padding: 6px 8px;
  vertical-align: middle;
}

/* zebra rows */
.tx-table tbody tr:nth-child(even){
  background-color: #fafafa;
}

/* hover red */
.tx-table tbody tr:hover{
  background-color: #eef6ff;
}

/* elipsa za duge nazive (Naziv kolona) */
.tx-table td.ellipsis{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 1px; /* trik da elipsa radi u tabeli */
}

/* =========================
   DROPDOWN: PRETRAGE
   ========================= */

:root {
  --accent-red: #b11226; /* elegantna tamna crvena */
}

/* Dropdown wrapper */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

/* Dugme "Pretrage ▾" */
.nav-dropbtn {
  display: flex;            /* tekst + strelica u istoj liniji */
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  cursor: pointer;
  color: white;
  white-space: nowrap;
  text-decoration: none;
}

/* Dropdown meni */
.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background-color: #fff;
  border: 1px solid #ddd;
  z-index: 9999;
}

/* Link u dropdownu */
.nav-dropdown-content a {
  display: block;
  padding: 10px 14px;
  background-color: #fff;
  color: #000;
  text-decoration: none;
}

/* Hover za dropdown link */
.nav-dropdown-content a:hover {
  background-color: var(--accent-red);
  color: #fff;
}

/* Prikaži dropdown na hover */
.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

/* =========================
   ZAŠTITA OD NAVBAR KONFLIKTA
   ========================= */

/* Hover efekat samo za GLAVNE linkove u navbaru */
.navbar > a:hover {
  background-color: var(--accent-red);
  border-radius: 6px;
}

/* Opcionalno: blagi transition */
.navbar a,
.nav-dropdown-content a {
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.btn-edit{
  background:#2b6cb0;
  color:#fff;
  font-weight:700;
}
.btn-edit:hover{
  opacity:0.9;
}

/* Actions column hard limit */
.actions-cell{
  width: 160px;        /* ili 170px ako želiš malo šire */
  max-width: 160px;
  box-sizing: border-box;
}

/* Dugmad u Actions koloni */
.actions-cell .btn,
.actions-cell form{
  width: 100%;
  margin-bottom: 8px;
  box-sizing: border-box;
}

/* Finalno dugme bez donjeg razmaka */
.actions-cell form:last-child{
  margin-bottom: 0;
}

/* Edit da izgleda kao primarno dugme */
.btn-edit{
  background:#2b6cb0;
  color:#fff;
  font-weight:700;
}

.invoice-toggle{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.invoice-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.invoice-pill input{
  /* sakrij default radio kružić */
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-badge{
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  text-transform: lowercase;
}

.pill-badge.standard{ background: #2e9b3b; color:#fff; }
.pill-badge.paused{ background: #d24a43; color:#fff; }

.pill-text{
  font-size: 18px;
  font-weight: 700;
}

.invoice-pill:has(input:checked){
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.invoice-pill:focus-within{
  outline: 2px solid rgba(0,0,0,0.2);
  outline-offset: 2px;
}

.fx-bar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin: 6px 0 14px 0;
  padding: 8px 10px;
  border:1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
}

.fx-label{
  font-weight:800;
  letter-spacing:-0.2px;
}

.fx-date{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.03);
  font-weight:700;
}

.fx-item{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background:#fff;
  font-weight:600;
}

.dash-subtitle{
  margin-top:6px;
  opacity:0.85;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.subtitle-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}

.pill-fx{
  display:block;
  width: fit-content;
  max-width: 100%;
  white-space: normal;   /* dozvoli prelom teksta */
  line-height: 1.2;
}

.btn-add-client{
  background:#2ea44f;
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.btn-add-client:hover{ opacity:.92; }

.btn-add-client .plus{
  width:26px;
  height:26px;
  border-radius:8px;
  background:rgba(255,255,255,.18);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}

/* Modal */
:root{
  --topbar-h: 70px; /* match main margin-top / navbar visinu */
}

/* kad je modal otvoren, zabrani scroll pozadine */
body.modal-open{
  overflow: hidden;
}

/* Overlay: pokriva ekran ispod navbara + dim pozadina + centriranje */
.modal-overlay{
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(0,0,0,.55);
  z-index: 30000;            /* iznad navbara (koji je 20000) */

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

/* Kartica: ograničena visina, header fiksan, body skroluje */
.modal-card{
  width: min(900px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;

  max-height: calc(100vh - var(--topbar-h) - 32px); /* topbar + padding */
  display: flex;
  flex-direction: column;
}

.modal-header{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
}

.modal-body{
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px;
}

.modal-close{
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.flash-container{
  margin: 12px auto;
  max-width: 900px;
  padding: 0 16px;
}

.flash{
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}

.flash-success{
  background: #e6f6ea;
  color: #1f7a3f;
  border: 1px solid #bde5c8;
}

.flash-error{
  background: #fdecea;
  color: #a61d24;
  border: 1px solid #f5c2c7;
}

.flash-warning{
  background: #fff4e5;
  color: #8a5a00;
  border: 1px solid #ffe0a3;
}

.secondary-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 4px;       /* isto kao submit-button */
  border: 1px solid #ccc;
  background: #f5f5f5;
  color: #111;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;    /* bitno za <a> */
}

.secondary-button:hover{
  background: #e9e9e9;
}




/* Loader u dugmadima sporih formi (upload poste, slanje mejla). */
.spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

button:disabled,
.submit-button:disabled {
    opacity: 0.7;
    cursor: progress;
}


/* Dugmad u zaglavlju strane (npr. "+ Nova pošta").
   .submit-button je width:100% jer se koristi za slanje formi - ovde treba
   dugme velicine sadrzaja, pa ide zasebna klasa. */
.btn-action {
    display: inline-block;
    width: auto;
    padding: 9px 18px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-action:hover {
    background-color: #45a049;
    color: #fff;
}

.btn-action-quiet {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.btn-action-quiet:hover {
    background-color: #f2f2f2;
    color: #333;
}

/* Red sa naslovom strane i dugmadima sa desne strane. */
.page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 6px;
}

.page-head h2 {
    margin: 0;
    margin-right: auto;
}

.page-sub {
    color: #666;
    margin: 0 0 20px;
    max-width: 70ch;
}

/* === TOGGLE PREKIDAC (auto-sken) ============================== */
.switch {
    display: inline-block;
    position: relative;
    width: 44px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #ccc;
    cursor: pointer;
    vertical-align: middle;
    transition: background .15s ease-in-out;
}

.switch:hover { background: #bbb; }

.switch .switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    transition: left .15s ease-in-out;
}

.switch.is-on { background: #4CAF50; }
.switch.is-on:hover { background: #43a047; }
.switch.is-on .switch-knob { left: 23px; }

.switch:focus-visible { outline: 2px solid #1f6feb; outline-offset: 2px; }

.switch-label {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #777;
    white-space: nowrap;
}

.switch.is-on + .switch-label { color: #1e7e4f; font-weight: 700; }

/* === SIROKE TABELE NA MALIM EKRANIMA ========================== */
/* Globalni table-layout:fixed deli sirinu podjednako na sve kolone, pa se
   kod tabela sa mnogo kolona tekst gnjeci i izlazi iz celije. Ovde tabela
   zadrzava prirodnu sirinu, a skroluje se unutar svog okvira - stranica
   se ne siri. */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
}

.table-scroll .client-table {
    table-layout: auto;
    min-width: 920px;
    margin-top: 0;
}

.table-scroll .client-table th,
.table-scroll .client-table td { white-space: normal; }
