/* Palette from the Kasavacanze logo: terracotta, brown, gold, slate blue, dark slate, teal */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #2f2a26;
  --muted: #736b63;
  --primary: #b4603c;
  --primary-dark: #90543c;
  --on-primary: #ffffff;
  --accent: #485454;
  --gold: #b48448;
  --slate: #78909c;
  --teal: #789c9c;
  --danger: #b23a27;
  --border: #eadfd0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(90, 60, 40, 0.08);
  --max-width: 880px;
  --tone-1: #c06c48;
  --tone-2: #78909c;
  --tone-3: #b48448;
  --tone-4: #485454;
  --tone-5: #90543c;
  --tone-6: #789c9c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1a17;
    --surface: #282320;
    --text: #f1e9df;
    --muted: #b5aa9d;
    --primary: #c06c48;
    --primary-dark: #e8a07c;
    --accent: #5f7c7c;
    --gold: #d0a25e;
    --danger: #ff8f75;
    --border: #3a322b;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    --tone-1: #d98560;
    --tone-2: #93aab5;
    --tone-3: #d0a25e;
    --tone-4: #8fb0b0;
    --tone-5: #c98466;
    --tone-6: #8fb5b5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--primary-dark); }
a:hover { color: var(--primary); }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch { display: flex; gap: 4px; flex-wrap: wrap; }
.lang-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
}
.lang-link.active { background: var(--primary); color: #fff; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 90px;
}

.hero { text-align: center; padding: 20px 0 8px; }
.hero h1 { font-size: 1.7rem; margin-bottom: 6px; }
.hero p { color: var(--muted); margin-top: 0; }

.section-title-main { margin-top: 24px; }
.section { margin: 28px 0; }
.section h2 { font-size: 1.25rem; border-bottom: 2px solid var(--border); padding-bottom: 6px; margin-bottom: 14px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  display: block;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.card-img {
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: var(--border);
}
.card-body { padding: 12px 14px; }
.card-body h3 { margin: 0 0 4px; font-size: 1.02rem; }
.guide-card .card-body { padding: 16px 14px; }
.muted { color: var(--muted); margin: 0; font-size: 0.92rem; }
.muted.small { font-size: 0.85rem; }

.breadcrumb { margin-bottom: 10px; }
.breadcrumb a { text-decoration: none; font-size: 0.9rem; }

article h1 { font-size: 1.6rem; margin-bottom: 6px; }
.address-line { color: var(--muted); }

.steps { padding-left: 22px; }
.steps li { margin-bottom: 10px; }

.code-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.wifi-list { display: flex; flex-direction: column; gap: 14px; }
.wifi-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 280px;
}
.wifi-box p { margin: 4px 0; word-break: break-word; }
.qr-holder { width: 160px; height: 160px; margin: 10px 0; background: #fff; border-radius: 8px; padding: 8px; display: flex; align-items: center; justify-content: center; }
.qr-holder svg { width: 100%; height: 100%; display: block; }
.qr-hint { font-size: 0.78rem; color: var(--muted); margin: 6px 0 12px; }
.wifi-connect-btn { border: none; cursor: pointer; font: inherit; }

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.site-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.note-card h3 { margin-top: 0; font-size: 1.05rem; }

.btn-link {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary) !important;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}

.table-scroll { overflow-x: auto; }
.waste-table { border-collapse: collapse; width: 100%; font-size: 0.82rem; }
.waste-table th, .waste-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: center; }
.waste-table th:first-child { text-align: left; white-space: nowrap; }
.waste-table td.on { background: var(--accent); }

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.place-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.place-card h4 { margin: 0 0 4px; font-size: 1rem; }
.place-links { font-size: 0.85rem; margin: 6px 0 0; }

.map-img { width: 100%; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; }
.attraction-list { padding-left: 20px; }
.attraction-list li { margin-bottom: 8px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-contacts-label { margin: 0 0 8px; }
.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.contacts-block { display: flex; flex-direction: column; gap: 14px; }
.contact-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.contact-name { font-weight: 600; color: var(--text); }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
}
.contact-link:hover { border-color: var(--primary); }
.contact-link.whatsapp:hover { border-color: var(--accent); }
.site-footer .contact-name { color: var(--muted); }
.site-footer .contact-link { background: transparent; }

.fab-pdf {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 20;
}
.fab-pdf:hover { background: var(--primary-dark); }

.print-only { display: none; }

@media print {
  .no-print, .fab-pdf { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; color: #000; }
  .page { max-width: 100%; padding: 0; }
  .card, .note-card, .place-card, .wifi-box { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .section { margin: 16px 0; }
  a { color: #000; text-decoration: underline; }
  .pdf-hint { color: #555; font-style: italic; }
}

/* Admin */
.admin-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.admin-wrap h1 { font-size: 1.4rem; }
.brand-logo { height: 64px; width: auto; display: block; border-radius: 14px; }
.brand-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand-head h1 { margin: 0; }
.login-logo { margin-bottom: 8px; }
.login-logo .brand-logo { height: 96px; }
.admin-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.admin-box h2 { font-size: 1.05rem; margin-top: 0; }
.active-tokens-title { margin: 22px 0 4px; font-size: 0.95rem; border-top: 1px solid var(--border); padding-top: 16px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.form-row textarea { min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: var(--muted); }
.contact-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 14px 4px 0;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}
.contact-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--primary);
}
.contact-check span { display: inline-block; }

.i18n-more, .ml-more { margin: 6px 0 2px; }
.i18n-more > summary, .ml-more > summary {
  cursor: pointer; list-style: none; font-size: 0.82rem; color: var(--muted);
  padding: 4px 0; display: inline-flex; align-items: center; gap: 4px;
}
.i18n-more > summary::-webkit-details-marker, .ml-more > summary::-webkit-details-marker { display: none; }
.i18n-more > summary::before, .ml-more > summary::before { content: '▸'; font-size: 0.7rem; }
.i18n-more[open] > summary::before, .ml-more[open] > summary::before { content: '▾'; }
.i18n-more .form-row { margin-top: 8px; }

.property-edit-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .property-edit-grid { grid-template-columns: 1fr 1fr; } }
.status-msg { font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }
.status-msg.ok { color: var(--accent); }
.status-msg.err { color: var(--danger); }
details.property-block { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
details.property-block summary { padding: 14px 16px; cursor: pointer; font-weight: 600; }
details.property-block .details-inner { padding: 0 16px 16px; }

.wifi-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; flex-wrap: wrap; }
.wifi-row .form-row { flex: 1 1 140px; margin-bottom: 0; }
.wifi-row .remove-wifi-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 8px 10px; cursor: pointer; height: 38px; }

.subsection { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }
.subsection h4 { margin: 0 0 10px; font-size: 0.95rem; }

.token-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 0.85rem; flex-wrap: wrap;
}
.token-row.expired { opacity: 0.55; }
.token-row .token-link-url { word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem; }
.token-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small { padding: 5px 10px; font-size: 0.78rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
.btn-small.danger { color: var(--danger); border-color: var(--danger); }
.token-generate-row { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.token-generate-row .form-row { margin-bottom: 0; }
.token-generate-row .generate-token-btn { align-self: flex-start; }

.user-row { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.user-row .user-email { font-weight: 600; }

/* Guest home: card navigation */
.hero .brand-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 10px; font-size: 1.3rem; font-weight: 600; letter-spacing: 0.02em; }
.hero .brand-row img { height: 64px; width: auto; max-width: 160px; object-fit: contain; }
.property-head { text-align: center; margin: 18px 0 20px; }
.property-name { font-size: 1.35rem; margin: 0 0 4px; border: none; padding: 0; }
.property-head .address-line { margin: 0; }

.nav-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nav-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 110px; padding: 16px 8px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center; -webkit-tap-highlight-color: transparent;
}
.nav-card:active { transform: scale(0.98); }
.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary);
}
.nav-label { font-weight: 600; font-size: 0.98rem; }

.back-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--primary-dark); font-weight: 600; font-size: 0.95rem; padding: 6px 10px 6px 4px; border-radius: 8px; }
.title-icon { display: inline-flex; vertical-align: -5px; margin-right: 8px; color: var(--primary); }
article h1 { display: flex; align-items: center; }

.parking-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.emergency-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.emergency-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.emergency-number { font-size: 1.3rem; font-weight: 700; min-width: 76px; color: var(--danger); }

@media print {
  .print-section { break-inside: auto; }
  .print-section h2 { break-after: avoid; }
  .property-head { text-align: left; }
}
.parking-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }

/* Card navigation: one logo tone per card */
.nav-card:nth-child(6n+1) { --tone: var(--tone-1); }
.nav-card:nth-child(6n+2) { --tone: var(--tone-2); }
.nav-card:nth-child(6n+3) { --tone: var(--tone-3); }
.nav-card:nth-child(6n+4) { --tone: var(--tone-4); }
.nav-card:nth-child(6n+5) { --tone: var(--tone-5); }
.nav-card:nth-child(6n+6) { --tone: var(--tone-6); }
.nav-icon { background: color-mix(in srgb, var(--tone, var(--primary)) 16%, transparent); color: var(--tone, var(--primary)); }
.hero .brand-row { color: var(--primary-dark); }
.address-line a { color: var(--primary-dark); }

/* Contact cards */
.contacts-block { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .contacts-block { grid-template-columns: 1fr 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.contact-head { display: flex; align-items: center; gap: 14px; }
.contact-avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; color: #fff; background: var(--tone-1); }
.contact-card:nth-child(2n) .contact-avatar { background: var(--tone-2); }
.contact-info { min-width: 0; }
.contact-info .contact-name { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.contact-phone { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.contact-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--on-primary); }
.contact-btn.call { background: var(--primary); }
.contact-btn.wa { background: var(--accent); }
.contact-btn .icon { flex: 0 0 auto; }
article > .muted { margin-bottom: 16px; }

.maps-links { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; vertical-align: middle; }
.maps-pill { font-size: 0.78rem; text-decoration: none; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--primary-dark); white-space: nowrap; }
.places-toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.places-toolbar .form-row { flex: 1 1 220px; margin-bottom: 0; }
.cat-dropdown { position: relative; }
.cat-dd-btn { width: 100%; text-align: left; padding: 8px 10px; font-size: 0.95rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.cat-dd-caret { margin-left: auto; opacity: .6; }
.cat-dd-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 4px; max-height: 320px; overflow: auto; }
.cat-dd-list[hidden] { display: none; }
.cat-dd-item { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cat-dd-item:hover, .cat-dd-item.active { background: rgba(180, 96, 60, .12); }
.cat-icon-sm { height: 20px; width: auto; vertical-align: -5px; }
.cat-icon { height: 30px; width: auto; vertical-align: -8px; }

/* Modal (admin) */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(20, 14, 10, 0.55); display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet { background: var(--bg); color: var(--text); width: 100%; max-height: 100dvh; height: 100dvh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; padding: 6px 10px; }
.modal-body { padding: 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.modal-foot .btn { flex: 1; }
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { max-width: 640px; height: auto; max-height: 90vh; border-radius: 16px; overflow: hidden; }
  .modal-foot .btn { flex: 0 0 auto; }
}

.place-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: var(--surface); }
.place-row-main { min-width: 0; }
.place-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.modal-foot .modal-delete { margin-right: auto; }

.hours-list { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 8px 0 10px; font-size: 0.92rem; }
.hours-list dt { font-weight: 600; }
.hours-list dd { margin: 0; }
.hours-edit-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hours-edit-row .hours-day { font-weight: 600; }
.hours-edit-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hours-edit-controls select { flex: 1 1 130px; min-width: 0; }
.hours-edit-controls input[type=time] { flex: 1 1 100px; min-width: 0; }
.hours-edit-controls .hours-times[hidden] { display: none; }
.hours-edit-controls .hours-times { display: flex; gap: 6px; align-items: center; flex: 2 1 220px; }
.parking-notes { margin: 8px 0 10px; font-size: 0.92rem; padding: 8px 10px; border-left: 3px solid var(--gold); background: rgba(180, 132, 72, .10); border-radius: 6px; }

.contact-order-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.contact-order-row .contact-check { flex: 1; margin: 0; font-size: 0.95rem; }
.contact-pos { width: 1.6em; text-align: right; font-weight: 700; color: var(--primary); }
.contact-move { display: inline-flex; gap: 4px; }
.contact-move .btn-small { padding: 6px 10px; min-width: 38px; }

.place-card { display: flex; flex-direction: column; }
.place-card .gallery { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; margin-top: 8px; }
.place-card .gallery img { height: 70px; border-radius: 6px; }
.place-card .place-distance { margin: auto 0 0; padding-top: 6px; text-align: right; font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.missing-tr { color: var(--danger); font-weight: 600; }
.translate-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }

.geo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; padding: 8px 12px; border-radius: 10px; background: rgba(120, 156, 156, .16); font-size: 0.9rem; }
.geo-bar[hidden], .geo-bar .geo-btn[hidden] { display: none; }
.geo-bar .geo-msg:empty { display: none; }
.geo-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.geo-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-order-box { margin-top: 16px; }
.cat-order-box summary { cursor: pointer; padding: 6px 0; }
.cat-order-name { flex: 1; display: inline-flex; align-items: center; gap: 6px; }

/* admin: property photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.photo-item { position: relative; }
.photo-item img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.photo-remove { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.photo-add { display: inline-block; cursor: pointer; }

/* guest: lightbox */
.gallery img { cursor: zoom-in; }
.lb-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.lb-overlay img { max-width: 96vw; max-height: 90vh; object-fit: contain; border-radius: 6px; touch-action: pan-y; }
.lb-close { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 56px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 26px; cursor: pointer; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.9rem; }
body.lb-open { overflow: hidden; }
@media print { .lb-overlay { display: none !important; } }

/* admin: accordion */
details.admin-box { padding: 0; }
details.admin-box > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.admin-box > summary::-webkit-details-marker { display: none; }
details.admin-box > summary h2 { margin: 0; }
details.admin-box > summary::after { content: '▾'; font-size: 1.1rem; opacity: .6; transition: transform .15s; }
details.admin-box[open] > summary::after { transform: rotate(180deg); }
details.admin-box[open] > summary { border-bottom: 1px solid var(--border); }
details.admin-box > :not(summary) { margin-left: 18px; margin-right: 18px; }
details.admin-box > :nth-child(2) { margin-top: 14px; }
details.admin-box > :last-child { margin-bottom: 18px; }
details.subsection > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.subsection > summary::-webkit-details-marker { display: none; }
details.subsection > summary h4 { margin: 0; }
details.subsection > summary::after { content: '▾'; opacity: .6; transition: transform .15s; }
details.subsection[open] > summary::after { transform: rotate(180deg); }
details.subsection[open] > summary { margin-bottom: 10px; }
details.property-block > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.property-block > summary::-webkit-details-marker { display: none; }
details.property-block > summary::after { content: '▾'; opacity: .6; transition: transform .15s; }
details.property-block[open] > summary::after { transform: rotate(180deg); }

/* admin: check-in / rules text editors */
.text-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.text-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.waste-edit { border-collapse: collapse; font-size: 0.85rem; }
.waste-edit th, .waste-edit td { padding: 4px 6px; text-align: center; }
.waste-edit th:first-child { text-align: left; white-space: nowrap; }

/* PDF generation (see /js/pdf.js) */
.pdf-stage {
  position: absolute; top: 0; left: 0; z-index: 1; box-sizing: border-box; background: #fff; color: #2f2a26;
  --bg: #ffffff; --surface: #ffffff; --text: #2f2a26; --muted: #736b63; --primary: #b4603c; --primary-dark: #90543c;
  --on-primary: #ffffff; --accent: #485454; --gold: #b48448; --slate: #78909c; --teal: #789c9c; --danger: #b23a27; --border: #eadfd0;
  --shadow: none; --tone-1: #c06c48; --tone-2: #78909c; --tone-3: #b48448; --tone-4: #485454; --tone-5: #90543c; --tone-6: #789c9c;
}
.pdf-stage .no-print, .pdf-stage .pdf-hint, .pdf-stage .fab-pdf { display: none !important; }
.pdf-stage .print-only { display: block; }
.pdf-stage .place-grid, .pdf-stage .contacts-block, .pdf-stage .card-grid { grid-template-columns: 1fr !important; }
.pdf-stage .card, .pdf-stage .note-card, .pdf-stage .place-card, .pdf-stage .wifi-box, .pdf-stage .contact-card { box-shadow: none; }
.pdf-stage .property-head { text-align: left; }
.pdf-stage .section { margin: 14px 0; }
body.pdf-busy { overflow: hidden; }
.pdf-overlay { position: fixed; inset: 0; z-index: 10000; background: var(--bg, #faf6ef); display: flex; align-items: center; justify-content: center; padding: 20px; }
.pdf-box { text-align: center; max-width: 360px; width: 100%; }
.pdf-spinner { width: 42px; height: 42px; margin: 0 auto 14px; border: 4px solid var(--border, #eadfd0); border-top-color: var(--primary, #b4603c); border-radius: 50%; animation: pdf-spin 0.9s linear infinite; }
@keyframes pdf-spin { to { transform: rotate(360deg); } }
.pdf-count, .pdf-file { color: var(--muted, #736b63); font-size: 0.9rem; }
.pdf-ok { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.pdf-err { color: var(--danger, #b23a27); font-weight: 600; }
.pdf-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pdf-btn { padding: 13px 18px; border: 0; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; background: var(--primary, #b4603c); color: #fff; }
.pdf-btn.secondary { background: transparent; color: var(--text, #2f2a26); border: 1px solid var(--border, #eadfd0); }
@media print { .pdf-overlay, .pdf-stage { display: none !important; } }
.property-head .maps-line { margin-top: 4px; }
.property-head .link-line { margin: 2px 0 6px; font-weight: 600; }

.checkout-reminder {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0;
  padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.checkout-reminder-link {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px;
  text-decoration: none; color: var(--primary-dark); font-weight: 600;
}
.checkout-reminder-link .icon { flex-shrink: 0; }
.checkout-reminder-dismiss {
  flex-shrink: 0; background: transparent; border: 1px solid var(--primary-dark); color: var(--primary-dark);
  border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.checkout-reminder-dismiss:hover { background: var(--primary-dark); color: #fff; }
.checkout-sub { margin: 18px 0 4px; font-size: 1.05rem; }
.checkout-time-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.checkout-time-input { font-size: 1rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-right: 10px; }

.contact-btn.mail { background: var(--slate); grid-column: 1 / -1; }
.emergency-sub { margin: 20px 0 8px; font-size: 1.05rem; }
.logo-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-edit img { height: 48px; width: auto; max-width: 160px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: #fff; }
.btn.danger-btn { background: var(--danger); }
#restore-summary { margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }

/* ================= Motion (guest + admin) ================= */
html { scroll-behavior: smooth; }
@keyframes m-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes m-slide-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes m-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Guest: page entrance */
.hero, .property-head, .page > article > h1 { animation: m-rise 0.5s ease-out backwards; }
.property-head { animation-delay: 0.08s; }
.nav-card { animation: m-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(0.08s + 0.06s * var(--i, 0)); }
.nav-card:nth-child(1) { --i: 1; } .nav-card:nth-child(2) { --i: 2; } .nav-card:nth-child(3) { --i: 3; }
.nav-card:nth-child(4) { --i: 4; } .nav-card:nth-child(5) { --i: 5; } .nav-card:nth-child(6) { --i: 6; }
.nav-card:nth-child(7) { --i: 7; } .nav-card:nth-child(8) { --i: 8; } .nav-card:nth-child(9) { --i: 9; } .nav-card:nth-child(n+10) { --i: 10; }
.fab-pdf { animation: m-slide-up 0.5s ease-out 0.7s backwards; }
.page > article > :not(h1):not(.print-only) { animation: m-fade 0.5s ease-out 0.1s backwards; }

/* Guest: menu, links and buttons */
.nav-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.nav-icon { transition: transform 0.22s ease; }
.lang-link { transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.back-btn { transition: transform 0.15s ease, opacity 0.15s ease; }
.site-header { transition: box-shadow 0.25s ease; }
.site-header.scrolled { box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12); }
.fab-pdf { transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.15s ease; }
.btn, .btn-small, .contact-btn, .btn-link, .contact-link, .maps-pill { transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.place-card, .note-card, .contact-card, .wifi-box, .emergency-item { transition: transform 0.18s ease, box-shadow 0.18s ease; }

/* Scroll reveal (classes are added by /js/motion.js only for cards below the fold) */
:where(.js-motion) .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--rd, 0s); }
:where(.js-motion) .reveal.in { opacity: 1; transform: none; }

@media (hover: hover) {
  .nav-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); border-color: var(--tone, var(--primary)); }
  .nav-card:hover .nav-icon { transform: scale(1.12) rotate(-4deg); }
  .lang-link:hover { transform: translateY(-1px); }
  .back-btn:hover { transform: translateX(-3px); }
  .fab-pdf:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
  .place-card:hover, .contact-card:hover, .note-card:hover, .emergency-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); }
}
.nav-card:active, .btn:active, .btn-small:active, .contact-btn:active, .fab-pdf:active { transform: scale(0.97); }

/* Overlays */
.lb-overlay { animation: m-fade 0.2s ease-out; }
.lb-overlay img { animation: m-pop 0.25s ease-out; }
.pdf-overlay { animation: m-fade 0.2s ease-out; }
.modal-overlay { animation: m-fade 0.18s ease-out; }
.modal-sheet { animation: m-slide-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Admin */
.admin-wrap { animation: m-fade 0.3s ease-out; }
details > summary { transition: background-color 0.15s ease; }
details.admin-box > summary:hover, details.subsection > summary:hover, details.property-block > summary:hover { background-color: rgba(180, 96, 60, 0.06); }
details[open] > :not(summary) { animation: m-down 0.28s ease-out; }
.place-row, .token-row, .user-row, .contact-order-row { transition: background-color 0.15s ease; }
.place-row:hover, .token-row:hover { background-color: rgba(180, 96, 60, 0.05); }
.photo-item, .cat-dd-item { transition: transform 0.15s ease, background-color 0.15s ease; }
.photo-item:hover { transform: scale(1.03); }
.cat-dd-list:not([hidden]) { animation: m-down 0.18s ease-out; }

/* Never animate what is printed or turned into the PDF */
.pdf-stage, .pdf-stage * { animation: none !important; transition: none !important; }
.pdf-stage .reveal { opacity: 1 !important; transform: none !important; }
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Reduced motion: no animation, no smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  :where(.js-motion) .reveal { opacity: 1; transform: none; }
}
.maps-edit { margin: 6px 0 4px; }
.maps-row, .web-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.maps-row .ml-more { flex: 1 0 100%; }
.maps-row input, .web-row input { flex: 1 1 0; min-width: 0; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 0.85rem; }
.attr-image { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.attr-image img { height: 70px; width: auto; max-width: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* wizard: new structure */
.wizard-sheet { max-width: 760px; }
.wiz-progress { height: 6px; background: var(--border); }
.wiz-progress > div { height: 100%; background: var(--primary); width: 0; transition: width 0.3s ease; }
.wiz-step-label { padding: 8px 16px 0; }
.wiz-title { margin: 0 0 8px; }
.wiz-body { overflow-y: auto; }
.wiz-summary { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.wiz-summary ul { margin: 6px 0 0; padding-left: 18px; }
.wiz-places { margin-top: 8px; }
.wiz-places-filter { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; margin-bottom: 6px; }
.wiz-places-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.wiz-places-list .contact-check { display: flex; margin: 4px 0; }

/* map picker */
.input-with-btn { display: flex; gap: 6px; align-items: stretch; }
.input-with-btn input { flex: 1 1 auto; min-width: 0; }
.input-with-btn .map-pick-btn, .maps-row .map-pick-btn { flex: 0 0 auto; white-space: nowrap; }
.modal-overlay.map-overlay { z-index: 130; }
.map-sheet { max-width: 760px; }
.map-search { display: flex; gap: 6px; margin-bottom: 8px; }
.map-search input { flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.map-results { display: flex; flex-direction: column; gap: 4px; max-height: 130px; overflow-y: auto; margin-bottom: 8px; }
.map-result { text-align: left; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.map-result:hover { background: rgba(180, 96, 60, 0.1); }
.map-canvas { height: min(52vh, 420px); border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.map-body { overflow-y: auto; }
.license-banner { margin: 8px 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(120, 156, 156, .16); font-size: 0.9rem; }
.license-banner.warn { background: rgba(180, 96, 60, .16); border: 1px solid var(--primary); }

/* Toasts: visible confirmation of every save in the admin panel */
.toast-host { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20000; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 16px; border-radius: 12px; color: #fff; background: #2e7d4f; box-shadow: 0 8px 26px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.toast.in { opacity: 1; transform: none; }
.toast.err { background: #b83b3b; }
.toast-icon { font-size: 1.25rem; line-height: 1; }
.toast-body { display: flex; flex-direction: column; min-width: 0; }
.toast-body strong { font-weight: 600; }
.toast-body small { opacity: .85; margin-top: 1px; }
@media print { .toast-host { display: none; } }
