/* App shell: levi meni (232px) + sadržaj. Ispod 900px meni je fioka (dugme u gornjoj traci). */

.hz-app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Gornja traka (samo telefon/tablet) ---------- */
.hz-topbar {
  display: none;
}

/* ---------- Levi meni ---------- */
.hz-nav {
  flex: 0 0 232px;
  width: 232px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px;
  background: var(--hz-nav-bg);
  color: var(--hz-nav-text);
  box-shadow: 0 1px 0 var(--hz-nav-bg); /* delić piksela na dnu pri skaliranju ekrana – vidi auth.css */
}

.hz-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 4px 8px;
  color: var(--hz-on-dark);
  text-decoration: none;
}

.hz-logo:hover { color: var(--hz-on-dark); }

.hz-logo__text {
  font-family: var(--hz-font-display);
  font-weight: 750;
  font-size: var(--hz-fs-h2);
  letter-spacing: -0.01em;
}

.hz-nav__tenant {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--hz-r-md);
  background: var(--hz-nav-hover);
}

.hz-nav__tenant-label {
  font-size: var(--hz-fs-xs);
  color: var(--hz-nav-muted);
}

.hz-nav__tenant-name {
  font-weight: 600;
  color: var(--hz-on-dark);
  overflow-wrap: anywhere;
}

/* Promena agencije (details/summary – radi i bez JS-a) */
.hz-nav__tenant--switch {
  padding: 0;
}

.hz-nav__tenant--switch > summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  padding: 10px 36px 10px 12px;
  border-radius: var(--hz-r-md);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.hz-nav__tenant--switch > summary::-webkit-details-marker {
  display: none;
}

.hz-nav__tenant--switch > summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--hz-nav-muted);
  border-bottom: 2px solid var(--hz-nav-muted);
  transform: translateY(-70%) rotate(45deg);
}

.hz-nav__tenant--switch[open] > summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.hz-nav__tenant-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0 6px 8px;
  list-style: none;
}

.hz-nav__tenant-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--hz-r-sm);
  background: transparent;
  color: var(--hz-nav-text);
  text-align: left;
  text-decoration: none;
}

.hz-nav__tenant-option:hover {
  background: var(--hz-nav-active);
  color: var(--hz-on-dark);
}

/* „Radim kao“ (admin platforme): trenutna firma, filter po nazivu, lista sa skrolom */
.hz-nav__tenant-option[aria-current="true"] {
  background: var(--hz-nav-active);
  color: var(--hz-on-dark);
}

.hz-nav__tenant-list li[hidden] {
  display: none;
}

[data-act-as] .hz-nav__tenant-list {
  max-height: 50vh;
  overflow-y: auto;
}

.hz-nav__tenant-filter {
  display: block;
  padding: 0 6px 6px;
}

.hz-nav__tenant-filter-input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--hz-nav-muted);
  border-radius: var(--hz-r-sm);
  background: transparent;
  color: var(--hz-on-dark);
  font: inherit;
  font-size: var(--hz-fs-sm);
}

.hz-nav__tenant-role {
  font-size: var(--hz-fs-xs);
  color: var(--hz-nav-muted);
}

.hz-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hz-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--hz-r-md);
  color: var(--hz-nav-text);
  text-decoration: none;
}

a.hz-nav__item:hover {
  background: var(--hz-nav-hover);
  color: var(--hz-on-dark);
}

.hz-nav__item[aria-current="page"] {
  background: var(--hz-nav-active);
  color: var(--hz-on-dark);
  font-weight: 600;
}

.hz-nav__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hz-nav__section-title {
  padding: 0 12px;
  font-size: var(--hz-fs-xs);
  color: var(--hz-nav-muted);
}

/* Stavke koje još ne postoje: vidljive, ali neaktivne */
.hz-nav__item--disabled {
  color: var(--hz-nav-muted);
  cursor: default;
}

.hz-nav__soon {
  margin-left: auto;
  font-size: var(--hz-fs-xs);
  color: var(--hz-nav-muted);
}

.hz-nav__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.hz-nav__user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--hz-nav-line);
}

.hz-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--hz-nav-active);
  color: var(--hz-on-dark);
  font-weight: 600;
  font-size: var(--hz-fs-sm);
}

.hz-nav__user-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hz-nav__user-name {
  color: var(--hz-on-dark);
  font-size: var(--hz-fs-sm);
  font-weight: 500;
  overflow-wrap: break-word; /* puno ime i prezime – prelom između reči, unutar reči samo ako ne staje */
}

.hz-nav__user-role {
  font-size: var(--hz-fs-xs);
  color: var(--hz-nav-muted);
}

.hz-nav__logout {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--hz-r-md);
  background: transparent;
  color: var(--hz-nav-text);
}

.hz-nav__logout:hover {
  background: var(--hz-nav-hover);
  color: var(--hz-on-dark);
}

.hz-nav__logout svg { width: 18px; height: 18px; }

/* ---------- Sadržaj ---------- */
.hz-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 28px 32px;
}

.hz-page-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.hz-spacer { flex: 1 1 auto; }

/* ---------- Telefon / tablet: meni u fioci ---------- */
@media (max-width: 899px) {
  .hz-app {
    flex-direction: column;
  }

  .hz-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: var(--hz-s2);
    min-height: 56px;
    padding: 6px 8px 6px 12px;
    background: var(--hz-nav-bg);
    color: var(--hz-on-dark);
  }

  .hz-topbar__tenant {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--hz-nav-text);
    font-size: var(--hz-fs-sm);
    text-align: right;
  }

  .hz-topbar__menu {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--hz-r-md);
    background: transparent;
    color: var(--hz-on-dark);
  }

  .hz-topbar__menu svg { width: 22px; height: 22px; }

  .hz-nav {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    height: 100%;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }

  .hz-nav.is-open {
    transform: none;
    visibility: visible;
    transition: transform .2s ease;
  }

  .hz-nav__close {
    position: absolute;
    top: 14px;
    right: 10px;
  }

  .hz-backdrop {
    position: fixed;
    z-index: 30;
    inset: 0;
    background: var(--hz-backdrop);
  }

  .hz-main {
    padding: 16px 16px 24px;
  }
}

@media (min-width: 900px) {
  .hz-nav__close,
  .hz-backdrop {
    display: none !important;
  }
}

/* „Nađi hotel“ u Admin meniju: naziv, mesto ili kod kod partnera → stranica hotela */
.hz-nav__find { padding: 0 4px 4px; }
.hz-nav__find-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--hz-nav-field-line);
  border-radius: var(--hz-r-md);
  background: var(--hz-nav-field);
  color: var(--hz-on-dark);
  font: inherit;
  font-size: var(--hz-fs-base);
}
.hz-nav__find-input::placeholder { color: var(--hz-nav-muted); }
.hz-nav__find-input:focus { outline: 2px solid var(--hz-sea); outline-offset: 1px; }

/* Oznaka verzije u sekciji Administracija (2026-11-11). */
.hz-nav__version { margin: 8px 0 0; padding: 0 12px; font-size: var(--hz-fs-xs); color: var(--hz-nav-muted); font-variant-numeric: tabular-nums; }
