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

.topbar {
  display: flex;
  align-items: center;
  background-color: #4285f4;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.menu-btn {
  font-size: 24px;
  background: none;
  border: none;
  margin-right: 10px;
  cursor: pointer;
  color: #fff;
}

.topbar h1 {
  flex-grow: 1;
  margin: 0;
  font-size: 20px;
  color: #fff;
}

/* === Blok za prijavljenog korisnika u sidebaru === */
.sidebar .menu-separator {
  margin: 12px 0;
  border-top: 1px solid #e2e8f0;
  list-style: none;
  height: 0;
}

.sidebar .user-info {
  list-style: none;
  padding: 12px 10px 14px 10px;
  margin: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.sidebar .user-info .user-name {
  display: block;
  font-size: 14px;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.3;
}

.sidebar .user-info .logout-link {
  display: inline-block;
  font-size: 14px;
  text-decoration: none;
  background: #ef4444;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
}

.sidebar .user-info .logout-link:hover {
  background: #dc2626;
}


#searchInput {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 300px;
}

.wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: #fff;
  border-right: 1px solid #ccc;
  padding: 10px;
  box-sizing: border-box;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar button {
  width: 100%;
  background: none;
  border: none;
  padding: 10px;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
}

.sidebar button:hover {
  background-color: #f0f0f0;
}

main {
  flex-grow: 1;
  padding: 20px;
}

.rezervacija {
  background: white;
  border-left: 4px solid #4285f4;
  margin-bottom: 12px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 5px;
}

/* FAB – plivajući gumb za dodavanje rezervacije */
.fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 58px;
  height: 58px;
  background: #1976d2;
  border-radius: 50%;
  box-shadow: 0 4px 16px #1976d24d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 150;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: box-shadow 0.2s, background 0.2s;
}
.fab:hover {
  background: #1561aa;
  box-shadow: 0 6px 18px #1976d24d;
}
.fab svg {
  display: block;
}

/* Kartica s detaljima rezervacije */
.full-page {
  width: 100%;
  min-height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

.page-header {
  background-color: #1976d2;
  color: white;
  padding: 16px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 12px #183d6620;
}

.card-container {
  flex-grow: 1;
  padding: 12px;
  margin-top: 60px; /* Visina headera */
}

.reservation-card {
  background-color: white;
  width: 100%;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.details-grid div {
  display: flex;
  flex-direction: column;
}

.details-grid label {
  font-weight: bold;
  margin-bottom: 4px;
  color: #333;
}

.details-grid span {
  background-color: #f0f0f0;
  padding: 8px;
  border-radius: 6px;
}

/* Gumbi na dnu kartice */
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-row button {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.button-row button:hover {
  background-color: #145ca1;
}

/* Responsive */
@media (max-width: 768px) {
  .wrapper {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    width: 70%;
    max-width: 250px;
    top: 50px;
    left: 0;
    height: calc(100% - 50px);
    background-color: #fff;
    z-index: 20;
    display: none;
    box-shadow: 2px 0 10px rgba(0,0,0,0.07);
  }
  .sidebar.show {
    display: block;
  }
  #searchInput {
    width: 100px;
  }
}
@media (max-width: 600px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
  .button-row {
    justify-content: center;
  }
  .reservation-card {
    padding: 15px;
  }
  .card-container {
    margin-top: 58px;
  }
  .fab {
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
  }
  .fab svg {
    width: 24px;
    height: 24px;
  }
}

/* === Posebni stilovi za detalje i edit mod === */

.editable {
  background: #f8fdff !important;
  border: 1px solid #97bcd9 !important;
}

.edit-buttons {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.edit-buttons button {
  background-color: #1976d2;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s;
}
.edit-buttons button:hover {
  background: #1150a3;
}

.details-grid input[type="checkbox"] {
  align-self: flex-start;
  margin-left: 0;
}

.msgbox {
  padding: 10px 18px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: bold;
  display: none;
}
.msgbox.success { background: #e3f7e3; color: #237d23; border: 1px solid #b6e2b6;}
.msgbox.error   { background: #ffecec; color: #a70000; border: 1px solid #efb2b2; }

/* === Auth (login) — dodatak === */
/* === Login (bez .container) — centrirano, responsive, edge-to-edge na uskom === */
.auth-form {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6f8;
  padding: 0;
}

.auth-card {
  width: 100%;
  max-width: 520px;               /* centrirana širina na desktopu */
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  box-sizing: border-box;
}

@media (max-width: 420px) {
  .auth-card {
    max-width: none;              /* koristi punu širinu */
    border-radius: 0;             /* bez “uški” na rubovima */
    border-left: none;
    border-right: none;
    padding: 1.25rem;
  }
}

/* Logo i naslov */
.auth-card .logo {
  display: block;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
  color: #2c3e50;
}

/* Polja */
.auth-card .form-group { margin-bottom: 1.25rem; }
.auth-card .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
}
.auth-card .form-group input {
  width: 100%;
  min-width: 0;
  padding: .75rem;
  border: 1px solid #bbb;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Gumb */
.auth-card .btn {
  width: 100%;
  padding: .9rem;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  background: #3498db;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .2s ease;
}
.auth-card .btn:hover { background: #2980b9; }

/* Poruka greške */
.auth-card .error {
  background: #fdeaea;
  border: 1px solid #f5c2c2;
  color: #7d1e1e;
  border-radius: 8px;
  padding: .7rem .9rem;
  margin-bottom: 1rem;
  text-align: center;
}
