:root {
  /* Apple-like: system grey page, white cards, Apple blue (always light, also in dark mode) */
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #636366;
  --border: #e5e5ea;
  --primary: #0066cc;
  --primary-text: #ffffff;
  --received: #8a5a00;
  --received-bg: #fff3d6;
  --in_progress: #0b5fa5;
  --in_progress-bg: #e1efff;
  --fixed: #1d7a3a;
  --fixed-bg: #e0f5e6;
  --error: #b42318;
  --radius: 14px;
  --header: #0b5d87; /* deep Adriatic blue bar */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23636366' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; }

/* No accidental zoom: double-tap zoom off and no text inflation on rotation.
   Pinch-zoom stays available on purpose (residents with weaker eyesight; public-sector accessibility rules). */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0.5rem 0; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.error { color: var(--error); margin: 0.5rem 0; }
.empty { text-align: center; padding: 2rem 0; }

/* ---------- layout ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: var(--header);
  color: #ffffff;
  border-bottom: 1px solid var(--header);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 26.25px; height: 33.6px; }
.topbar nav { display: flex; gap: 0.25rem; }
.topbar nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.topbar nav a.active { background: var(--bg); color: var(--text); font-weight: 600; }

/* language switch + menu button, right side of the top bar */
.top-actions { display: flex; align-items: center; gap: 0.4rem; }
/* language: "HR ▾" button that opens a small list */
.lang-pick { position: relative; }
.lang-toggle {
  gap: 0.35rem;
  height: 44px;
  padding: 0 0.65rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}
.lang-toggle svg { color: var(--muted); transition: transform 0.2s; }
.lang-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-switch {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 170px;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
}
.lang-switch[hidden] { display: none; }
.lang-switch button {
  justify-content: flex-start;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 9px;
  background: none;
  font-weight: 500;
}
.lang-switch button strong { min-width: 1.6rem; font-size: 0.85rem; }
.lang-switch button[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.lang-switch button[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--primary); font-weight: 700; }
.lang-switch button:hover { background: var(--bg); }

/* hamburger menu (citizen app) */
.menu-toggle {
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.topbar nav.menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 2rem;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 200px;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
}
.topbar nav.menu a {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
}
.topbar nav.menu a:hover { background: var(--bg); }
.topbar nav.menu a.active { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); }
.topbar nav.menu .menu-logout {
  justify-content: flex-start;
  margin-top: 0.2rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  color: var(--error);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}
.topbar nav.menu .menu-logout:hover { background: var(--bg); }
.topbar nav.menu a.staff-link {
  margin-top: 0.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  border-radius: 10px;
  background: #ede3cf; /* the same Brač stone as "Sutivan" in the header */
  color: #4a3b22; /* dark stone text, readable on it */
  font-size: 0.9rem;
  font-weight: 600;
}
.topbar nav.menu a.staff-link:hover { background: #e3d5b8; }

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span { transition: none; }
}

.container { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.container.wide { max-width: 900px; }

/* ---------- controls ---------- */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button.primary, .button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
button:disabled { opacity: 0.6; cursor: wait; }
button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
}

input, textarea, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
/* own dropdown arrow, set in from the right edge (the built-in one can't be moved) */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 12px 8px;
  cursor: pointer;
}
input:focus, textarea:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.field { display: block; margin: 1rem 0; }
.hint { display: block; margin: 0.4rem 0 0; color: var(--muted); font-size: 0.85rem; }
.field .hint { font-weight: 400; }

/* ---------- fire: emergency notice ---------- */

.emergency {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 2px solid #b42318;
  border-radius: var(--radius);
  background: color-mix(in srgb, #b42318 10%, var(--surface));
}
.emergency strong { display: block; font-size: 1.05rem; }
.emergency p { margin: 0.35rem 0 0; }
.emergency-calls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.8rem; }
.button.danger { flex-direction: column; gap: 0; padding: 0.6rem; background: #b42318; border-color: #b42318; color: #ffffff; }
.button.danger strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.button.danger span { font-size: 0.85rem; font-weight: 600; }

/* ---------- privacy notice ---------- */

.summary-box { margin: 1rem 0 0.5rem; padding: 1rem 1.1rem; }
.summary-box ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.summary-box li { margin: 0.25rem 0; }
.prose h2 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.4rem 0; }
.prose p, .prose li { line-height: 1.6; }
mark.fill { padding: 0 0.25em; border-radius: 4px; background: var(--received-bg); color: var(--received); font-weight: 600; }
.field > span { display: block; margin-bottom: 0.3rem; font-weight: 600; }

#report-form button[type="submit"] { width: 100%; margin-top: 0.5rem; padding: 0.9rem; font-size: 1.05rem; }

/* ---------- report form ---------- */

.categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0;
  border: 0;
}
.category {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 56px;
  padding: 0.5rem 0.6rem;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  hyphens: auto;
  overflow-wrap: anywhere;
}
.category { position: relative; }
.category input { position: absolute; inset: 0; width: auto; opacity: 0; pointer-events: none; }
.category .icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
}
.category:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.category:has(input:focus-visible) { outline: 2px solid var(--primary); }

.photo-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 160px;
  padding: 1rem;
  border: 2px dashed #c7c7cc;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.photo-drop img { max-height: 280px; border-radius: 10px; object-fit: cover; }
.photo-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 14px;
  background: var(--bg);
  color: var(--primary);
  font-size: 1.9rem;
  line-height: 1;
}

.location {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.7rem;
  row-gap: 0.15rem;
  margin: 1rem 0;
  padding: 0.8rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.35;
}
/* animated status light (no box around it):
   searching = rings ripple out · found = dot pops in, two rings, then still · unavailable = slow red pulse */
.location .dot {
  --dot: var(--muted);
  position: relative;
  grid-row: span 2;
  /* level with the first line of text, also when the message runs over several lines */
  align-self: start;
  margin-top: -0.375rem;
  width: 2.25rem;
  height: 2.25rem;
}
.location .dot::before,
.location .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.location .dot::before { background: var(--dot); z-index: 1; }
.location .dot::after { border: 2px solid var(--dot); box-sizing: border-box; animation: ripple 1.4s ease-out infinite; }
.location > :not(.dot) { grid-column: 2; }
.location button.link { justify-self: start; font-size: 0.9rem; }
.location.ok { border-color: color-mix(in srgb, var(--fixed) 35%, var(--border)); }
.location.ok .dot { --dot: var(--fixed); }
.location.ok .dot::before { animation: pop 0.45s ease-out; }
.location.ok .dot::after { animation: ripple 1.2s ease-out 2; }
.location.bad { border-color: color-mix(in srgb, var(--error) 35%, var(--border)); }
.location.bad .dot { --dot: var(--error); }
.location.bad .dot::before { animation: throb 1.6s ease-in-out infinite; }
.location.bad .dot::after { animation: ripple 1.6s ease-out infinite; }
@keyframes ripple { from { transform: scale(1); opacity: 0.8; } to { transform: scale(3.2); opacity: 0; } }
@keyframes pop { 0% { transform: scale(0.3); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes throb { 50% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) {
  .location .dot::before, .location .dot::after { animation: none !important; }
  .location .dot::after { display: none; }
}

/* ---------- sent ---------- */

.big-check {
  width: 72px;
  height: 72px;
  margin: 1.5rem auto 0.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fixed-bg);
  color: var(--fixed);
  font-size: 2.2rem;
  font-weight: 700;
}
.code {
  font: 700 1.8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  margin: 0.25rem 0 1rem;
}
.actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- lists & cards ---------- */

.lookup { display: flex; gap: 0.5rem; margin: 1rem 0; }
.lookup input { text-transform: uppercase; }

.list { display: flex; flex-direction: column; gap: 0.6rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.row .badge { align-self: flex-start; margin-top: 0.1rem; }
.row > img { align-self: flex-start; }
/* phones: put the status under the text so the text gets the full width */
@media (max-width: 480px) {
  .row { display: grid; grid-template-columns: 56px 1fr; align-items: start; row-gap: 0.4rem; }
  .row > img { grid-row: span 2; }
  .row .badge { grid-column: 2; justify-self: start; margin-top: 0; }
}
.row .grow { display: flex; flex-direction: column; gap: 0.1rem; }
.row strong { display: flex; align-items: center; gap: 0.4rem; line-height: 1.3; }
.row .cat-img { width: 1.1rem; height: 1.1rem; border-radius: 0; vertical-align: 0; }
button.row { width: 100%; border: 0; border-radius: 0; font-weight: normal; text-align: left; justify-content: flex-start; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

.badge {
  flex-shrink: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge.received { color: var(--received); background: var(--received-bg); }
.badge.in_progress { color: var(--in_progress); background: var(--in_progress-bg); }
.badge.fixed { color: var(--fixed); background: var(--fixed-bg); }

/* ---------- report detail ---------- */

.back { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 44px; margin-bottom: 0.75rem; padding: 0.4rem 1rem 0.4rem 0.8rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); color: var(--primary); font-weight: 600; text-decoration: none; }
.back:hover { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); }
.back:active { transform: scale(0.97); }
.back:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hero { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 1rem 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 1rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}
.steps li {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.steps li::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: var(--border);
  z-index: 0;
}
.steps li:first-child::before { display: none; }
.steps .step-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.steps li.done { color: var(--text); font-weight: 600; }
.steps li.done::before, .steps li.done .step-dot { background: var(--fixed); }

.updates { list-style: none; padding: 0; margin: 0; }
.updates li { padding: 0.7rem 0; border-top: 1px solid var(--border); }
.updates p { margin: 0.4rem 0 0; }
.update-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.update-head time { color: var(--muted); font-size: 0.85rem; }

/* ---------- admin ---------- */

.login { max-width: 360px; margin: 3rem auto; padding: 1.5rem; }
.login button { width: 100%; }

.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar select { flex: 1; min-width: 160px; width: auto; }
/* "Pronađi prijavu": number in, report opens */
.find-report { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; margin: -0.4rem 0 1rem; }
.find-report input { min-height: 46px; }
.find-report button.primary { min-height: 46px; padding-inline: 1.1rem; }
.find-result { grid-column: 1 / -1; }
.find-result:empty { display: none; }
.find-result .error { margin: 0; }
.find-hits strong { white-space: nowrap; }
.find-hits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.find-hits button { display: block; width: 100%; min-height: 44px; text-align: left; line-height: 1.4; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-weight: 400; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
/* status tiles: coloured blocks (number + label); tap one to filter the list by that status */
button.stat {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0.8rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 400;
  text-align: left;
}
.stat strong { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat.received { background: var(--received-bg); color: var(--received); }
.stat.in_progress { background: #c3dcf8; border-color: #a6c9ef; color: var(--in_progress); } /* stronger than the page's light blue so it stands out */
.stat.fixed { background: var(--fixed-bg); color: var(--fixed); }
button.stat[aria-pressed="true"] { border-color: currentColor; }

.details { padding: 0 1rem 1rem; border-top: 1px solid var(--border); }
.update-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.update-form select { width: auto; }
.update-form input { flex: 1; min-width: 200px; }

/* staff page: name on one line, "Gradska uprava" small underneath */
.brand-staff { display: flex; flex-direction: column; line-height: 1.15; }
.brand-sub { font-size: 0.78em; font-weight: 600; color: var(--muted); }

/* phones: tighter bar so "Prijavi problem – Supetar" stays on one line */
@media (max-width: 560px) {
  .topbar { gap: 0.5rem; padding-inline: 0.85rem; }
  .topbar nav.menu { right: 0.85rem; }
}

/* phones: the name scales with the screen width (≈13.3px on the smallest Androids, 16.3px on the biggest iPhones)
   so the whole bar always fits on one line; the crest gives way only on the very smallest screens */
@media (max-width: 560px) {
  .brand { font-size: clamp(0.8rem, 3.7vw, 1.05rem); gap: 0.4rem; }
  .topbar { gap: 0.5rem; } /* the name never touches the bell */
  .brand img { width: clamp(20px, 6.5vw, 26.25px); height: auto; }
  .lang-toggle { padding-inline: clamp(0.45rem, 2.2vw, 0.65rem); }
}
@media (max-width: 359px) {
  .brand img { display: none; }
  .brand { font-size: 0.75rem; }
}

@media (max-width: 420px) {
  .topbar nav a { padding: 0.35rem 0.5rem; font-size: 0.85rem; }
}


/* image category icons sit like an emoji in running text */
.cat-img { width: 1.25em; height: 1.25em; vertical-align: -0.25em; }
.category .icon .cat-img { width: 2rem; height: 2rem; vertical-align: 0; }

/* ---------- announcements ---------- */

.news-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--text);
  text-decoration: none;
}
.news-banner .icon { font-size: 1.4rem; }
.news-banner strong, .news-banner .small { display: block; }
.news-banner .small { color: var(--primary); font-weight: 600; margin-top: 0.1rem; }

.announcement { padding: 1rem 1.1rem; }
.announcement-head { display: flex; align-items: center; gap: 0.45rem; }
.announcement-head .icon { font-size: 1.2rem; }
.announcement h2 { margin: 0.4rem 0 0.3rem; font-size: 1.15rem; }
.announcement-body { margin: 0 0 0.5rem; white-space: pre-line; }
.announcement p.small { margin: 0; }
.announcement.kind-warning { border-color: color-mix(in srgb, var(--error) 45%, var(--border)); }

.push-box { padding: 1rem 1.1rem; margin: 1rem 0 1.25rem; }
.push-box p { margin: 0.35rem 0 0.8rem; }
.push-box .push-on { color: var(--fixed); font-weight: 600; margin-bottom: 0.5rem; }

/* ---------- report map ---------- */

.map {
  height: 420px;
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 0;
}
.container.wide .map { height: 520px; }
.leaflet-popup-content { color: #1c2430; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.leaflet-popup-content .popup-photo { display: block; width: 180px; height: 120px; object-fit: cover; border-radius: 6px; margin: 0.4rem 0; }
.pin {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  color: #ffffff;
  font: 700 14px/1 system-ui, sans-serif;
}
.pin.small { display: inline-grid; width: 20px; height: 20px; font-size: 11px; box-shadow: none; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.9rem; }
.map-legend > span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------- staff page: tabs, overview, announcements ---------- */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1.25rem;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.tabs button { flex: 1 1 auto; padding: 0.6rem 0.3rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 0.92rem; }
.tabs button[aria-current="page"] { background: var(--bg); color: var(--text); }
@media (max-width: 420px) { .tabs button { font-size: 0.8rem; padding-inline: 0.2rem; } }

.reach-line { display: flex; width: fit-content; align-items: center; gap: 0.5rem; margin: 0 auto 0.9rem; padding: 0.55rem 1.2rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); color: var(--muted); font-size: 1rem; }
.reach-line:empty { display: none; }
.reach-line strong { color: var(--text); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.85rem 1rem 0.9rem; border: 1px solid var(--border); border-top: 4px solid var(--tone, var(--border)); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.tile .tile-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tone-text, var(--muted)); }
.tile strong { font-size: clamp(1.7rem, 8vw, 2.2rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.tile.tone-open { --tone: var(--received); --tone-text: var(--received); }
.tile.tone-fixed { --tone: var(--fixed); --tone-text: var(--fixed); }
.tile.tone-time { --tone: var(--primary); --tone-text: var(--primary); }
.tile.tone-month { --tone: var(--muted); }
.tile-bar { display: block; height: 6px; margin: 0.15rem 0 0.1rem; border-radius: 999px; background: var(--fixed-bg); overflow: hidden; }
.tile-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--fixed); }

.chart { padding: 1rem 1.1rem; margin-bottom: 1rem; }
.chart h2 { margin: 0 0 0.8rem; font-size: 1.05rem; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 2.5rem; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--border) 60%, transparent); }
.bar { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--primary); }
.bar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.announce-form { padding: 1rem 1.1rem; margin-bottom: 1.5rem; }
.announce-form h2 { margin-top: 0; }
.fold { padding: 0; margin-bottom: 1rem; }
.fold > summary { display: flex; align-items: center; gap: 0.7rem; min-height: 64px; padding: 0.7rem 1rem; cursor: pointer; list-style: none; }
.fold .fold-icon { font-size: 1.6rem; line-height: 1; flex: none; }
.fold .fold-title { flex: 1; min-width: 0; font-size: 1.2rem; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.fold[open] > summary { border-bottom: 1px solid var(--border); }
.fold[open] > summary .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.fold > .announce-form { margin: 0; padding: 0.9rem 1.1rem 1.1rem; }
.fold > .announce-form > :first-child { margin-top: 0; }
.check { display: flex; align-items: center; gap: 0.6rem; margin: 0.25rem 0 1rem; font-weight: 600; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }
.announcement.expired { opacity: 0.6; }
button.link.danger-link { color: var(--error); }

/* ---------- staff report card ---------- */

button.report-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: none;
  font-weight: normal;
  text-align: left;
}
button.report-row:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.rc-title { display: flex; align-items: center; gap: 0.45rem; min-width: 0; font-size: 1rem; }
.rc-title .cat-img { width: 1.15rem; height: 1.15rem; }
.rc-body { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.rc-body img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.rc-text { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.rc-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  line-height: 1.4;
}
.rc-desc.none { color: var(--muted); font-style: italic; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.rc-meta > span + span::before { content: "·"; margin-right: 0.5rem; }
.rc-dept { margin-top: -0.25rem; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.rc-code { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* ---------- waste collection ---------- */

.badge.cancelled { color: var(--muted); background: color-mix(in srgb, var(--muted) 15%, transparent); }
.waste-section { padding: 1rem 1.1rem; margin-bottom: 1rem; }
section.waste-section:not(.card) { padding-inline: 0; }
.waste-section h2 { margin-top: 0; }
.schedule { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.schedule li { display: flex; gap: 0.75rem; align-items: flex-start; }
.schedule .icon { font-size: 1.4rem; line-height: 1.2; }
.schedule .grow > * { display: block; }
.schedule .next { margin-top: 0.15rem; color: var(--primary); font-weight: 600; }
.bulky-item { padding: 0.85rem 0.9rem; }
.bulky-item p { margin: 0.4rem 0 0; }
.bulky-item .facts { margin: 0.6rem 0 0; }
.date-group h3 { margin: 1rem 0 0.5rem; font-size: 1rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0 0.6rem; align-items: flex-end; }
.inline-form .field { flex: 1 1 140px; margin: 0.5rem 0; }
.inline-form button { margin: 0.5rem 0; }
.slots { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.slots li { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.schedule-form { margin-top: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.days { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0.75rem; padding: 0; border: 0; }
.days legend { width: 100%; margin-bottom: 0.4rem; padding: 0; font-weight: 600; }
.day { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; padding: 0 0.7rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.day input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.day:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }

/* ---------- fire warning (city announcement of kind "fire") ---------- */

.fire-alert { background: #b42318; color: #ffffff; }
.fire-alert-inner { max-width: 560px; margin: 0 auto; padding: 0.9rem 1rem 1rem; }
.fire-alert-inner { padding-top: 0.5rem; padding-bottom: 0.6rem; }
.fire-alert-head { display: flex; align-items: center; gap: 0.5rem; }
button.fire-alert-toggle {
  flex: 1;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: #ffffff;
  text-align: left;
}
.fire-alert-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.fire-alert-action { flex-shrink: 0; font-size: 0.85rem; font-weight: 600; opacity: 0.9; white-space: nowrap; }
.fire-alert-112 {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  min-height: 40px;
  border-radius: 10px;
  background: #ffffff;
  color: #b42318;
  font-weight: 800;
  text-decoration: none;
}
.fire-alert-details p { margin: 0.35rem 0 0; }
.fire-alert-details .emergency-calls { margin-top: 0.7rem; }
.fire-alert .button.danger { background: #ffffff; border-color: #ffffff; color: #b42318; }
.announcement.kind-fire { border: 2px solid #b42318; }
.announcement.kind-fire .emergency-calls { margin: 0.6rem 0; }
.staff-alerts { padding: 1rem 1.1rem; margin-bottom: 1rem; border-color: color-mix(in srgb, #b42318 45%, var(--border)); }
.staff-alerts h2 { margin-top: 0; }
.staff-alerts .push-on { color: var(--fixed); font-weight: 600; }
.staff-alerts .push-head h2 { margin: 0; }
.staff-alerts .push-head { margin-bottom: 0.6rem; }
/* fire alarm: a slim bar that opens */
.staff-alerts.compact { padding: 0; }
.staff-alerts.compact.is-on { border-color: color-mix(in srgb, var(--fixed) 40%, var(--border)); }
.staff-alerts.compact summary { display: flex; align-items: center; gap: 0.6rem; min-height: 56px; padding: 0.6rem 0.9rem; cursor: pointer; list-style: none; }
.staff-alerts.compact summary::-webkit-details-marker { display: none; }
.staff-alerts.compact summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.staff-alerts.compact[open] .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.staff-alerts.compact > :not(summary) { margin-inline: 1.1rem; }
.staff-alerts.compact > button { margin-bottom: 1rem; }
.staff-sum { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.staff-sum small { color: var(--muted); font-size: 0.85rem; }

/* ---------- notification topics + first-visit invitation ---------- */

.topics { margin: 0.5rem 0 0.9rem; }
.topics-drop { margin: 0.6rem 0 0.9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.topics-drop summary { display: flex; align-items: center; gap: 0.6rem; min-height: 52px; padding: 0.5rem 0.85rem; cursor: pointer; list-style: none; }
.topics-drop summary::-webkit-details-marker { display: none; }
.topics-drop summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 12px; }
.topics-drop[open] .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.topics-drop .topics { margin: 0; padding: 0 0.85rem 0.85rem; }
.topic { min-height: 40px; font-size: 0.9rem; }
.topic:has(input:disabled) { opacity: 0.85; cursor: default; }
/* first visit: one slim bar inviting to turn on alerts */
.onboard-bar { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; padding: 0.55rem 0.5rem 0.55rem 0.8rem; border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); border-radius: 12px; background: var(--surface); }
.onboard-bell { font-size: 1.2rem; line-height: 1; flex: none; }
.onboard-text { display: flex; flex-direction: column; gap: 0.05rem; flex: 1; min-width: 0; line-height: 1.3; }
.onboard-text strong { font-size: 0.92rem; }
.onboard-text small { color: var(--muted); font-size: 0.8rem; }
.onboard-go { flex: none; min-height: 40px; padding: 0.4rem 0.85rem; font-size: 0.9rem; }
.onboard-close { flex: none; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 1rem; }
p.onboard-bar { font-weight: 600; color: var(--fixed); }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- location: actions + pick on map ---------- */

.location-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-top: 0.2rem; }
.location-actions button.link { min-height: 32px; }
.pick-map-wrap { margin: -0.4rem 0 1rem; }
.pick-map-wrap .hint { margin: 0 0 0.4rem; }
.map.pick-map { height: 300px; margin: 0; }

/* in-page confirmation (instead of pop-up dialogs) */
.confirm-box {
  margin: 0.75rem 0;
  padding: 0.85rem 0.9rem;
  border: 2px solid #b42318;
  border-radius: var(--radius);
  background: color-mix(in srgb, #b42318 10%, var(--surface));
}
.confirm-box p { margin: 0 0 0.7rem; font-weight: 600; }
button.danger-solid { background: #b42318; border-color: #b42318; color: #ffffff; }
button.cancel-booking { width: 100%; min-height: 46px; background: var(--surface); border: 1px solid color-mix(in srgb, #b42318 45%, var(--border)); color: #b42318; font-weight: 600; }
button.cancel-booking:hover { background: color-mix(in srgb, #b42318 6%, var(--surface)); }

/* iPhone zooms into any form field whose text is smaller than 16px – keep them all at least 16px.
   (Last in the file so the `font: inherit` rules above can't undo it.) */
/* date as Dan / Mjesec / Godina dropdowns */
.date-row { position: relative; }
.date-field {
  justify-content: flex-start;
  gap: 0.6rem;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  font-weight: 500;
  text-align: left;
}
.date-field svg { color: var(--muted); flex: none; }
.date-field[aria-expanded="true"] { border-color: var(--primary); }
.date-text.placeholder { color: var(--muted); }
/* the real input under the box: carries the value and the "required" bubble, never seen */
/* time like the iPhone alarm clock: two snapping wheels, a grey band marks the choice, rows fade out */
.tw-wheel { position: relative; display: flex; justify-content: center; align-items: center; gap: 0.2rem; height: 220px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.tw-wheel[hidden] { display: none; }
.tw-wheel::before { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 44px; transform: translateY(-50%); border-radius: 10px; background: color-mix(in srgb, var(--muted) 14%, var(--surface)); }
.tw-col { position: relative; z-index: 1; width: 86px; height: 220px; padding-block: 88px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 38%, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 38%, #000 62%, transparent 100%); outline: none; }
.tw-col::-webkit-scrollbar { display: none; }
.tw-col:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); border-radius: 10px; }
.tw-item { height: 44px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; font-size: 1.75rem; font-variant-numeric: tabular-nums; color: var(--muted); cursor: pointer; user-select: none; }
.tw-item.on { color: var(--text); font-weight: 600; }
.tw-colon { position: relative; z-index: 1; font-size: 1.75rem; font-weight: 600; padding-bottom: 0.15rem; }
.tw-foot { display: flex; justify-content: flex-end; margin-top: 0.35rem; }
.tw-clock { font-size: 1.1rem; }
.date-value { position: absolute; inset: auto 0 0 0; width: 100%; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.date-clear { margin-top: 0.4rem; font-size: 0.9rem; }
.date-cal { margin-top: 0.5rem; }
.date-cal[hidden] { display: none; }
.date-cal .cal-day:not(:disabled) { border-color: var(--border); font-weight: 600; }
.date-cal .cal-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.inline-form .field-date { flex: 2 1 280px; }
/* ---------- collection zones map ---------- */
.zone-map { height: 270px; margin: 0.6rem 0 1rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; isolation: isolate; }
.zone-group { --zone: var(--border); margin-top: 0.6rem; border: 1px solid color-mix(in srgb, var(--zone) 55%, transparent); border-left: 5px solid var(--zone); border-radius: 12px; background: color-mix(in srgb, var(--zone) 12%, var(--surface)); }
.zone-group.zone-west { --zone: #7ed957; }
.zone-group.zone-east { --zone: #2f80ed; }
.zone-group summary { display: flex; align-items: center; gap: 0.65rem; min-height: 56px; padding: 0.6rem 0.8rem; cursor: pointer; list-style: none; }
.zone-group summary::-webkit-details-marker { display: none; }
.zone-sum { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.zone-sum small { color: var(--muted); font-size: 0.85rem; }
.zone-chevron { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform 0.2s; flex: none; }
.zone-group[open] .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.zone-group .schedule { padding: 0.2rem 0.9rem 0.9rem; }
.zone-group summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .zone-chevron { transition: none; } }
.zone-swatch { width: 18px; height: 18px; border-radius: 5px; border: 2px solid; flex: none; }
.zone-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.zone-legend li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.1rem 0.5rem; }
.zone-legend small { grid-column: 2; color: var(--muted); }
.zone-west .zone-swatch, .zone-tag.zone-west { background: rgb(126 217 87 / 0.5); border-color: #7ed957; }
.zone-east .zone-swatch, .zone-tag.zone-east { background: rgb(47 128 237 / 0.5); border-color: #2f80ed; }
/* collection days as chips in the staff schedule list */
.row-days { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.35rem; }
.day-chip { padding: 0.15rem 0.55rem; border-radius: 7px; background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.zone-tag { display: inline-block; padding: 0 0.45rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; }
.zone-popup { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.95rem; }
.zone-popup-btn { margin-top: 0.5rem; min-height: 44px; padding: 0.4rem 0.8rem; font-size: 0.92rem; white-space: nowrap; }
.zone-popup-on { margin-top: 0.4rem; color: var(--fixed); font-weight: 600; }
/* the waste reminder line under the zone map */
.zone-remind { display: flex; align-items: flex-start; gap: 0.6rem; margin: -0.4rem 0 1rem; padding: 0.7rem 0.85rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); font-size: 0.92rem; line-height: 1.4; }
.zone-remind.on { border-color: color-mix(in srgb, var(--fixed) 45%, var(--border)); background: var(--fixed-bg); }
.zone-remind-icon { font-size: 1.1rem; line-height: 1.3; flex: none; }
.zone-remind .grow { min-width: 0; }
.zone-remind-msg { display: block; margin-top: 0.3rem; color: var(--error); font-weight: 500; }
.zone-remind button.link { flex: none; min-height: 32px; font-weight: 600; }

/* ---------- booking: service, calendar, time slots ---------- */
.book-step { display: flex; align-items: center; gap: 0.55rem; margin: 1.3rem 0 0.6rem; font-size: 1rem; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--primary-text); font-size: 0.85rem; font-weight: 700; flex: none; }
.service-pick { display: grid; gap: 0.5rem; }
.service { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 0.7rem; min-height: 56px; padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.service:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, transparent); }
.service input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); }
.service-icon { width: clamp(2rem, 9vw, 2.5rem); height: clamp(2rem, 9vw, 2.5rem); display: block; }
.service-text { display: flex; flex-direction: column; gap: 0.1rem; }
.service-text small { font-size: 0.85rem; line-height: 1.35; }

.cal { border: 1px solid var(--border); border-radius: 12px; padding: 0.6rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.cal-month { text-transform: capitalize; }
.cal-nav { width: 44px; height: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-weekdays span { padding: 0.2rem 0; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-day { aspect-ratio: 1; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; font-weight: 500; font-variant-numeric: tabular-nums; position: relative; }
.cal-day:disabled { opacity: 0.35; cursor: default; }
.cal-day.open { border-color: var(--border); background: color-mix(in srgb, var(--fixed) 10%, var(--surface)); font-weight: 700; }
.cal-day.open::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--fixed); }
.cal-day.full { opacity: 0.55; text-decoration: line-through; }
.cal-day.selected { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.cal-day.selected::after { background: var(--primary-text); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.cal-legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cal-key { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); }
.cal-key.open { background: color-mix(in srgb, var(--fixed) 25%, var(--surface)); border-color: var(--fixed); }
.cal-key.full { background: var(--border); }

.slot-day { margin: 0 0 0.5rem; font-weight: 600; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.5rem; }
.slot { flex-direction: column; gap: 0.1rem; min-height: 56px; padding: 0.5rem; font-variant-numeric: tabular-nums; }
.slot small { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.slot:disabled { opacity: 0.45; cursor: default; text-decoration: line-through; }
.slot.selected { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.slot.selected small { color: inherit; }
.chosen { margin: 0 0 0.5rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--fixed-bg); color: var(--fixed); font-weight: 600; }
.book-form .book-details .field:first-of-type { margin-top: 0.5rem; }
.slot-time { font-variant-numeric: tabular-nums; }
h3.sub { margin: 1.2rem 0 0.2rem; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .book-form * { scroll-behavior: auto; } }

/* ---------- full-screen photo ---------- */
button.photo-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
button.photo-open img { display: block; }
.photo-viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; overflow: hidden; padding: 0; border: 0; background: #000; }
.photo-viewer::backdrop { background: #000; }
.photo-viewer img { width: 100%; height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.photo-close {
  position: fixed; top: calc(env(safe-area-inset-top) + 12px); right: calc(env(safe-area-inset-right) + 12px);
  width: 48px; height: 48px; padding: 0; border: 1px solid rgb(255 255 255 / 0.35); border-radius: 50%;
  background: rgb(0 0 0 / 0.6); color: #fff; font-size: 1.3rem;
}

/* location: a retry that fails again nudges the box so it is clear something happened */
.loc-again { display: block; margin-bottom: 0.25rem; }
.location.again { animation: loc-nudge 0.4s ease-out; }
@keyframes loc-nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .location.again { animation: none; } }

/* notifications box: status label beside the title */
.push-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.state-pill { flex: none; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; border: 1px solid transparent; }
.state-pill.on { background: var(--fixed-bg); color: var(--fixed); }
.state-pill.on::before { content: "● "; }
.state-pill.off, .state-pill.unsupported { background: var(--bg); color: var(--muted); border-color: var(--border); }
.state-pill.ios { background: var(--received-bg); color: var(--received); }
.state-pill.denied, .state-pill.failed { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error); }
.push-fix { margin-top: 0.5rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* staff reports: one bar per kind of problem */
.pillars { display: flex; flex-direction: column; gap: 0.6rem; }
.pillar { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pillar.has-new { border-left: 4px solid var(--received); }
.pillar summary { display: flex; align-items: center; gap: 0.75rem; min-height: 60px; padding: 0.6rem 0.9rem; cursor: pointer; list-style: none; }
.pillar summary::-webkit-details-marker { display: none; }
.pillar summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.pillar-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; font-size: 1.25rem; flex: none; }
.pillar-icon .cat-img { width: 36px; height: 36px; vertical-align: 0; }
.pillar-count { min-width: 2rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--bg); text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.pillar.is-empty summary { opacity: 0.6; }
.pillar[open] .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.pillar > .list { padding: 0 0.6rem 0.6rem; }
.pillar-empty { margin: 0; padding: 0 0.9rem 0.9rem; }

/* sea-blue header: white name, see-through buttons */
.topbar .brand { color: #ffffff; }
.topbar .brand-sub { color: #cfe8f6; }
.topbar .brand-place { color: #ede3cf; } /* white Brač stone */
.topbar .lang-toggle, .topbar .menu-toggle { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.32); color: #ffffff; }
.topbar .lang-toggle:hover, .topbar .menu-toggle:hover { background: rgb(255 255 255 / 0.2); }
.topbar .lang-toggle svg { color: #cfe8f6; }
.topbar .lang-toggle:focus-visible, .topbar .menu-toggle:focus-visible { outline-color: #ffffff; }
.topbar .menu, .topbar .lang-switch { color: var(--text); }

/* phones: report types always in two even columns; icon and text scale with the screen */
@media (max-width: 560px) {
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category { gap: clamp(0.4rem, 2vw, 0.55rem); padding-inline: clamp(0.45rem, 2.2vw, 0.6rem); font-size: clamp(0.8rem, 3.6vw, 0.9rem); }
  .category .icon, .category .icon .cat-img { width: clamp(1.6rem, 8vw, 2rem); height: clamp(1.6rem, 8vw, 2rem); }
}

.loc-note { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.82rem; }

/* "Obavijesti na mobitel": a closed bar under the announcements */
.push-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: max(16px, env(safe-area-inset-right));
  z-index: 20;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  padding: 0 1.1rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
  transform-origin: top right;
  animation: panel-in 0.18s ease-out;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .push-panel { animation: none; } }
.push-panel p { margin: 0.35rem 0 0.8rem; }
.push-panel .push-on { color: var(--fixed); font-weight: 600; margin-bottom: 0.5rem; }
.push-panel > button { width: 100%; min-height: 46px; }
.push-panel-head { display: flex; align-items: center; gap: 0.6rem; min-height: 56px; position: sticky; top: 0; background: var(--surface); }
.push-panel-head strong { flex: 1; min-width: 0; }
.push-close { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; background: var(--bg); color: var(--muted); font-size: 0.95rem; flex: none; }
.push-drop { padding: 0; }
.push-drop summary { display: flex; align-items: center; gap: 0.6rem; min-height: 56px; padding: 0.6rem 0.9rem; cursor: pointer; list-style: none; }
.push-drop summary::-webkit-details-marker { display: none; }
.push-drop summary strong { flex: 1; min-width: 0; }
.push-drop summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.push-drop[open] > summary .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.push-drop > :not(summary) { margin-inline: 1.1rem; }
.push-drop > :last-child { margin-bottom: 1rem; }

/* "photograph only the problem": easy to notice, under the photo box */
.photo-note { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--text); font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.photo-note svg { flex: none; color: var(--primary); }

/* location: waiting for the tap on "Koristi moju lokaciju" */
.location.idle .dot { --dot: var(--primary); }
.location.idle .dot::after { animation: none; opacity: 0; }
.loc-btn { min-height: 40px; padding: 0.4rem 0.9rem; font-size: 0.92rem; }
.loc-btn::before { content: "📍 "; }

/* bell in the top bar */
.bell-toggle { position: relative; width: 44px; height: 44px; padding: 0; border-radius: 10px; }
.topbar .bell-toggle { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.32); color: #ffffff; }
.topbar .bell-toggle:hover { background: rgb(255 255 255 / 0.2); }
.topbar .bell-toggle.active { background: #ffffff; border-color: #ffffff; color: var(--header); } /* on the notifications page: tap again to go back */
.bell-toggle.on::after {
  content: "✓"; position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px;
  display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--header);
  background: #2f9e44; color: #ffffff; font-size: 10px; font-weight: 800; line-height: 1;
}
.bell-toggle:disabled { opacity: 0.6; }
@media (max-width: 560px) {
  .top-actions { gap: 0.3rem; }
  .bell-toggle, .menu-toggle { width: 40px; }
}
@media (max-width: 400px) {
  .lang-toggle svg { display: none; }
  .lang-toggle { padding-inline: 0.55rem; }
}

/* iPhone: how to add the app to the home screen */
.guide { max-width: min(420px, calc(100vw - 2rem)); padding: 1.25rem 1.25rem 1rem; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgb(0 0 0 / 0.3); }
.guide::backdrop { background: rgb(10 30 50 / 0.55); }
.guide h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.guide .muted { margin: 0 0 0.9rem; }
.guide-steps { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.guide-steps li { display: flex; align-items: center; gap: 0.75rem; line-height: 1.35; }
.guide-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg); color: var(--primary); font-size: 1.2rem; font-weight: 700; }
.guide button { width: 100%; }

/* invitation box: slides up at the bottom of the screen */
.invite {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 30;
  width: min(528px, calc(100% - 24px));
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.5rem 0.65rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 12px 32px rgb(10 40 70 / 0.25);
  transform: translate(-50%, calc(100% + 24px)); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.25s ease-out;
}
.invite.shown { transform: translate(-50%, 0); opacity: 1; }
.invite-done { margin: 0.2rem 0.3rem; color: var(--fixed); font-weight: 600; }
body.has-invite .container { padding-bottom: 7rem; }
body.typing .invite { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .invite { transition: none; } }

/* weather: one quiet centred line on the light page, right under the header */
.weather {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.2rem 1.1rem;
  padding: 0.6rem 1rem 0;
  color: var(--text);
}
.weather + .container { padding-top: 0.4rem; }
.weather-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; }
.weather-icon { display: inline-flex; color: var(--primary); }
.weather-icon.sunny { color: #c76b00; } /* sun and moon in warm amber */
.weather-dir { color: var(--muted); font-weight: 500; }
.wind-compass { display: inline-flex; margin-left: 0.1rem; }
.wind-compass .wc-needle { fill: #d92d20; stroke-linejoin: round; }

/* ================= animations (all off with "Reduce Motion") ================= */

/* 1 · living weather icons */
.wx-rays { transform-box: fill-box; transform-origin: center; animation: wx-spin 16s linear infinite; }
.wx-glow { animation: wx-glow 3.2s ease-in-out infinite; }
.wx-drift { animation: wx-drift 3.5s ease-in-out infinite alternate; }
.wx-drops { animation: wx-fall 1.1s linear infinite; }
.wx-drops.slow { animation-duration: 2.4s; }
.wx-flash { animation: wx-flash 2.6s infinite; }
.wx-wind { stroke-dasharray: 18 3; animation: wx-flow 1.8s linear infinite; }
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-glow { 50% { opacity: 0.55; } }
@keyframes wx-drift { from { transform: translateX(-0.9px); } to { transform: translateX(0.9px); } }
@keyframes wx-fall { 0% { transform: translateY(-1.5px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(1.8px); opacity: 0; } }
@keyframes wx-flash { 0%, 86%, 100% { opacity: 1; } 90% { opacity: 0.15; } 94% { opacity: 1; } 97% { opacity: 0.3; } }
@keyframes wx-flow { to { stroke-dashoffset: -21; } }

/* 2 · report buttons press in and spring back; the chosen icon pops */
.category { transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), border-color 0.2s, background-color 0.2s, box-shadow 0.2s; }
.category:active { transform: scale(0.96); }
.category:has(input:checked) .icon { animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { 40% { transform: scale(1.22); } }

/* 3 · the bell swings */
.bell-toggle.ring svg { transform-origin: 50% 12%; animation: ring 0.9s ease-in-out; }
@keyframes ring { 15% { transform: rotate(16deg); } 30% { transform: rotate(-13deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

/* 4 · "sent": a green circle draws itself, fills, and the tick draws in */
.sent-check { display: block; margin: 0.5rem auto 0.25rem; overflow: visible; }
.sc-circle { fill: transparent; stroke: #2f9e44; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; transform-box: fill-box; transform-origin: center;
  animation: sc-draw 0.6s ease-out forwards, sc-fill 0.3s 0.55s ease-out forwards, sc-bump 0.35s 0.85s ease-out; }
.sc-tick { fill: none; stroke: #ffffff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: sc-draw 0.35s 0.75s ease-out forwards; }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }
@keyframes sc-fill { to { fill: #2f9e44; } }
@keyframes sc-bump { 50% { transform: scale(1.08); } }

/* 5 · pages: cards slide up and fade in one after another */
#app.enter > *, #app.enter > .list > *, #app.enter .categories > label { animation: enter 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) backwards; }
#app.enter > :nth-child(2), #app.enter > .list > :nth-child(2), #app.enter .categories > label:nth-of-type(2) { animation-delay: 0.04s; }
#app.enter > :nth-child(3), #app.enter > .list > :nth-child(3), #app.enter .categories > label:nth-of-type(3) { animation-delay: 0.08s; }
#app.enter > :nth-child(4), #app.enter > .list > :nth-child(4), #app.enter .categories > label:nth-of-type(4) { animation-delay: 0.12s; }
#app.enter > :nth-child(5), #app.enter > .list > :nth-child(5), #app.enter .categories > label:nth-of-type(5) { animation-delay: 0.16s; }
#app.enter > :nth-child(n+6), #app.enter > .list > :nth-child(n+6), #app.enter .categories > label:nth-of-type(n+6) { animation-delay: 0.2s; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }

/* 6 · the photo lands in the box */
#photo-preview.landed { animation: land 0.5s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes land { from { opacity: 0; transform: scale(0.85); } }

/* 7 · the big title slides up into the header (the app name makes room) */
.brand-stack { display: grid; }
.brand-stack > * { grid-area: 1 / 1; transition: opacity 0.25s ease-out, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1); }
.brand-title { width: 0; min-width: 100%; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(10px); }
.topbar.titled .brand-name { opacity: 0; transform: translateY(-10px); }
.topbar.titled .brand-title { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .wx-rays, .wx-glow, .wx-drift, .wx-drops, .wx-flash, .wx-wind, .bell-toggle.ring svg, #photo-preview.landed,
  .category:has(input:checked) .icon, #app.enter *, .sc-circle, .sc-tick { animation: none !important; }
  .sc-circle, .sc-tick { stroke-dashoffset: 0; }
  .sc-circle { fill: #2f9e44; }
  .category, .brand-stack > * { transition: none; }
  .category:active { transform: none; }
}

/* "Grad vas pita": polls */
.poll { padding: 1rem 1.1rem; }
.poll-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.poll-state { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.poll-state.open { background: var(--fixed-bg); color: var(--fixed); }
.poll-state.closed { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.poll-q { margin: 0.6rem 0 0.75rem; font-size: 1.1rem; line-height: 1.3; }
.poll-options { display: flex; flex-direction: column; gap: 0.5rem; }
.poll-option { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 48px; padding: 0.6rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: left; }
button.poll-option:not(:disabled):active { transform: scale(0.98); }
.poll-option.mine { border-color: var(--primary); }
.poll-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--primary) 14%, transparent); transition: width 0.7s cubic-bezier(0.2, 0.9, 0.3, 1); }
.poll-option.mine .poll-bar { background: color-mix(in srgb, var(--primary) 24%, transparent); }
.poll.shown .poll-bar { width: var(--pct); }
.poll-text, .poll-pct { position: relative; }
.poll-pct { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.poll-option:disabled { opacity: 1; cursor: default; }
.poll-foot { margin: 0.6rem 0 0; }
.poll-thanks { margin: 0.4rem 0 0; color: var(--fixed); font-weight: 600; }
.poll-inputs { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.4rem; }
.poll .actions-row { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; }
@media (prefers-reduced-motion: reduce) { .poll-bar { transition: none; } }
/* staff: six tabs wrap into two rows on small phones */
/* 8 staff tabs: two rows of four on every phone; wider screens wrap if they ever run out of room */
.tabs { flex-wrap: wrap; }
@media (max-width: 560px) { .tabs { display: grid; grid-template-columns: repeat(4, 1fr); } .tabs button { min-width: 0; } }

/* "Korisno": ferry, pharmacy, emergency numbers */
.info-card { padding: 1rem 1.1rem; margin-bottom: 1rem; }
.info-card h2 { margin: 0 0 0.6rem; }
.info-card h2:last-child { margin-bottom: 0; }
/* a closed info bar (catamaran): title + one line, opens on tap */
.info-drop { padding: 0; }
.info-drop summary { display: flex; align-items: center; gap: 0.6rem; min-height: 60px; padding: 0.75rem 1.1rem; cursor: pointer; list-style: none; }
.info-drop summary::-webkit-details-marker { display: none; }
.info-drop summary strong { font-size: 1.05rem; }
.info-drop summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.info-drop[open] .zone-chevron { transform: rotate(-135deg) translateY(-3px); }
.info-card.info-drop > :not(summary) { margin-inline: 1.1rem; }
.info-card.info-drop > p { margin-top: 0.1rem; margin-bottom: 0.6rem; font-size: 0.95rem; line-height: 1.45; }
.info-card.info-drop > :last-child { display: inline-block; margin-bottom: 1rem; }
/* "Korisna mjesta": small map + list */
.places-map { height: 240px; border-radius: 12px; overflow: hidden; isolation: isolate; border: 1px solid var(--border); }
.place-pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); font-size: 16px; line-height: 1; box-shadow: 0 2px 6px rgb(0 0 0 / 0.25); }
.places-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0.4rem; }
.places-list li { display: flex; }
.places-list button { display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; width: 100%; min-height: 52px; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 0.88rem; font-weight: 500; text-align: left; line-height: 1.25; }
.places-list button:active { transform: scale(0.98); }
.places-icon { width: 1.5rem; font-size: 1.1rem; text-align: center; flex: none; }
.ferry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.6rem; }
.ferry-col { display: flex; flex-direction: column; gap: 0.35rem; }
.ferry-times { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ferry-time { padding: 0.25rem 0.55rem; border-radius: 8px; background: var(--bg); font-weight: 700; font-variant-numeric: tabular-nums; }
.ferry-time.next { background: var(--primary); color: var(--primary-text); }
.ferry-time.gone { color: var(--muted); background: transparent; font-weight: 500; text-decoration: line-through; text-decoration-color: rgb(0 0 0 / 0.25); }
.info-name { margin: 0; font-size: 1.05rem; font-weight: 700; }
.info-card p { margin: 0.25rem 0; }
.info-card .call { margin-top: 0.6rem; }
.emergency-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.emergency-list a { display: flex; align-items: center; gap: 0.9rem; min-height: 48px; padding: 0.4rem 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.emergency-list li:first-child a { border-top: 0; }
.emergency-list strong { min-width: 3rem; color: var(--error); font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* "Događanja": events with a calendar-style date tile */
.event { display: flex; gap: 0.85rem; padding: 0.9rem 1rem; }
.event.past { opacity: 0.6; }
.event-date { flex: none; display: flex; flex-direction: column; align-items: center; width: 52px; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); align-self: flex-start; }
.event-month { width: 100%; padding: 0.15rem 0; background: var(--error); color: #ffffff; font-size: 0.72rem; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: 0.04em; }
.event-daynum { padding: 0.2rem 0 0.3rem; font-size: 1.45rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.event-body { flex: 1; min-width: 0; }
.event-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.event-body p { margin: 0.2rem 0 0; }
.event-desc { line-height: 1.45; }
.event-foot { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.65rem; }
.going { min-height: 40px; padding: 0.4rem 1rem; }
.going.on { border-color: var(--fixed); background: var(--fixed-bg); color: var(--fixed); }
.going.on, .going.primary { transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
.going:active { transform: scale(0.95); }
.event-count { color: var(--muted); font-weight: 600; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .going:active { transform: none; } }

/* Obavijesti: polls sit between the important announcements and the rest */
.news-polls, .news-kind { margin: 1rem 0; }
.news-kind .announcement h2 { margin-top: 0; }
.section-label { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--muted); font-weight: 700; }
.news-kind + .news-polls, .news-polls + .news-kind { margin-top: 1.25rem; }

/* archive + "close all" */
.close-all-row { padding: 0 0.6rem 0.6rem; }
button.close-all { width: 100%; min-height: 50px; font-size: 1rem; background: var(--fixed); border-color: var(--fixed); }
.archive-link { display: flex; align-items: center; gap: 0.5rem; width: fit-content; min-height: 46px; margin: 1rem auto 0; padding: 0.45rem 0.6rem 0.45rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 0.95rem; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.archive-link:hover { background: color-mix(in srgb, var(--muted) 6%, var(--surface)); }
.archive-link:active { transform: scale(0.97); }
.archive-link-count { min-width: 1.9rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bg); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.archive-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.5rem; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.archive-row .confirm-box { flex-basis: 100%; }
.delete-archive { margin-bottom: 1rem; }

.rc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding: 0 0.9rem 0.75rem; margin-top: -0.25rem; }
.rc-actions .confirm-box { flex-basis: 100%; }
/* soft borderless pills: grey for archive, red for delete */
button.pill-btn { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 40px; padding: 0.4rem 1rem; border: 0; border-radius: 999px; font-size: 0.9rem; font-weight: 600; box-shadow: none; }
button.pill-archive { background: color-mix(in srgb, var(--muted) 14%, var(--surface)); color: var(--text); }
button.pill-archive:hover { background: color-mix(in srgb, var(--muted) 22%, var(--surface)); }
button.pill-delete { background: color-mix(in srgb, #d92d20 12%, var(--surface)); color: #b42318; }
button.pill-delete:hover { background: color-mix(in srgb, #d92d20 20%, var(--surface)); }
button.pill-btn:active { transform: scale(0.97); }
button.archive-all { width: 100%; min-height: 44px; color: var(--muted); }
.rc-fix { display: block; margin-top: 0.3rem; color: var(--fixed); font-size: 0.88rem; font-weight: 600; }

/* location box before the first tap: text beside the dot, then two full-width buttons edge to edge */
.location.idle .location-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-top: 0.75rem; }
.location.idle .location-actions button { width: 100%; min-height: 46px; justify-content: center; font-size: 0.95rem; }
.location.idle #location-pick { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--primary); font-weight: 600; text-decoration: none; }
.location.idle #location-pick::before { content: "🗺 "; }
/* "use my location" in the same white style as "pick on the map" */
#location-gps.loc-btn { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: none; }
/* both location buttons in the same light blue as the banners on the main page */
#location-gps.loc-btn, .location.idle #location-pick { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
#location-gps.loc-btn:hover, .location.idle #location-pick:hover { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); }

/* ---------- Izgubljeno i nađeno ---------- */
.tabs button { position: relative; }
.tab-count { position: absolute; top: -3px; right: -3px; display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; box-shadow: 0 0 0 2px var(--surface); padding: 0 0.3rem; border-radius: 999px; background: #c2410c; color: #ffffff; font-size: 0.75rem; font-weight: 700; }
.lost-start { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 1rem 0; }
.lost-start-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; min-height: 96px; padding: 0.8rem 0.6rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 0.95rem; text-align: center; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.lost-start-btn { text-decoration: none; cursor: pointer; }
.lost-start-btn:active { transform: scale(0.97); }
.lost-start-btn.lost { color: #9a3412; }
.lost-start-btn.found { color: var(--fixed); }
.lost-start-icon { font-size: 1.6rem; line-height: 1; }
.lost-form { padding: 1rem 1.1rem; margin-bottom: 1rem; }
.lost-form h2 { margin-top: 0; }
.lost-form.lost { border-top: 4px solid #ea580c; }
.lost-form.found { border-top: 4px solid var(--fixed); }
.lost-photo-pick { display: flex; align-items: center; gap: 0.75rem; min-height: 52px; padding: 0.5rem 0.8rem; margin-top: 0.75rem; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg); cursor: pointer; color: var(--primary); font-weight: 600; }
.lost-photo-pick > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem; }
.lost-preview { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.lost-form-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 0.5rem; margin-top: 1rem; }
.lost-form-actions button { min-height: 48px; }
.lost-filter { display: flex; gap: 0.4rem; margin: 1.25rem 0 0.75rem; padding: 0.25rem; border-radius: 12px; background: color-mix(in srgb, var(--muted) 12%, transparent); }
.lost-filter button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 0.9rem; color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; }
.lost-filter button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.lost-count { min-width: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.lost-item { display: grid; grid-template-columns: 84px 1fr; gap: 0.85rem; padding: 0.85rem; align-items: start; }
.lost-item .photo-open { padding: 0; border: 0; background: none; }
.lost-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; display: block; }
.lost-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--bg); }
.lost-body { min-width: 0; }
.lost-body h3 { margin: 0.3rem 0 0.15rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.lost-body p { margin: 0.2rem 0; }
.lost-desc { overflow-wrap: anywhere; }
.lost-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge.lost-badge.lost { color: #9a3412; background: #ffedd5; }
.badge.lost-badge.found { color: var(--fixed); background: var(--fixed-bg); }
.lost-call { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; margin-top: 0.3rem; font-weight: 600; text-decoration: none; }
.lost-item.returned { opacity: 0.75; }
.lost-own { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.6rem; }
.lost-own button.primary { min-height: 44px; }
.success-note { padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--fixed-bg); color: var(--fixed); font-weight: 600; }
@media (max-width: 359px) {
  .lost-item { grid-template-columns: 64px 1fr; }
  .lost-photo { width: 64px; height: 64px; }
}

input, select, textarea { font-size: max(16px, 1em); }

/* ---------- pull to refresh (home-screen app) ---------- */

.ptr {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 64px);
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
  opacity: 0;
  transform: translate(-50%, -50px);
  pointer-events: none;
  will-change: transform, opacity;
  /* letting go: a soft spring back (while dragging there is no transition, so it follows the finger) */
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.25s ease-out;
}
.ptr.ready { border-color: var(--primary); color: var(--primary); }
.ptr-arrow { display: inline-block; transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
.ptr.dragging, .ptr.dragging .ptr-arrow { transition: none; }
.ptr.loading .ptr-arrow { animation: ptr-spin 0.7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
main { transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1); }
main.ptr-dragging { transition: none; }
@media (prefers-reduced-motion: reduce) { .ptr, .ptr-arrow, main { transition: none; } .ptr.loading .ptr-arrow { animation: none; } }

/* ⚙️ Postavke */
.settings-title { margin: 0.2rem 0 0.2rem; }
.settings-body { display: flex; flex-direction: column; gap: 0.2rem; }
.settings-preview { margin: 0; padding: 0.7rem 0.9rem; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); line-height: 1.5; }
.settings-crest-row { display: flex; align-items: center; gap: 1rem; }
.settings-crest { width: 64px; height: auto; flex: none; }
.settings-map { height: 280px; margin: 0.4rem 0; border-radius: 12px; overflow: hidden; isolation: isolate; border: 1px solid var(--border); }
.settings-dot { display: block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #ffffff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.35); }
.settings-modes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.3rem 0; }
button.pill-on { background: var(--primary); color: #ffffff; }
.settings-places { display: flex; flex-direction: column; gap: 0.5rem; }
.settings-place { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0.35rem; align-items: center; padding: 0.4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.settings-place.moving { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.settings-place input { min-height: 40px; padding: 0.35rem 0.5rem; }
.settings-place .settings-icon { text-align: center; font-size: 1.2rem; padding: 0.2rem; }
.settings-place .pill-btn { min-height: 40px; padding: 0.3rem 0.65rem; }
.settings-place-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.settings-translations { flex-basis: 100%; font-size: 0.88rem; }
.settings-translations summary { cursor: pointer; color: var(--muted); padding: 0.1rem 0.2rem; }
.settings-translations input { margin-top: 0.3rem; width: 100%; }
.settings-add { align-self: flex-start; margin: 0.4rem 0; }
.place-pin.moving { border-color: #d92d20; transform: scale(1.15); }
.settings-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.6rem; }
.settings-sea { padding-left: 0.4rem; border-left: 3px solid var(--border); margin-bottom: 0.5rem; }
.settings-savebar { position: sticky; bottom: 0; z-index: 5; margin: 1rem -0.25rem 0; padding: 0.75rem 0.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.settings-save { width: 100%; min-height: 52px; font-size: 1.05rem; }
.settings-status { text-align: center; margin: 0.4rem 0 0; }
@media (max-width: 380px) { .settings-two { grid-template-columns: 1fr; } }
