/* Override Pico's responsive font scaling */
:root { --pico-font-size: 100% !important; }

/* ── Theme variables ── */
:root {
  /* Pico overrides */
  --pico-primary: #1a7bbf;
  --pico-primary-hover: #155e96;
  --pico-primary-focus: rgba(26, 123, 191, 0.25);
  --pico-primary-background: #1a7bbf;
  --pico-primary-hover-background: #155e96;
  --pico-primary-inverse: #fff;
  --pico-border-radius: 0.5rem;
  --pico-container-max-width: 1200px;

  /* Domain colors */
  --color-primary: #1a7bbf;
  --color-primary-hover: #155e96;
  --color-info: #0078ff;
  --color-danger: #c00;
  --color-text: #333;
  --color-text-muted: #666;
  --color-border: #ccc;
  --color-border-light: #e9ecef;
  --color-surface: #f8f9fa;
  --color-surface-alt: #f6f6f6;

  /* Calendar state colors */
  --cal-booked-bg: rgba(200,0,0,0.2);
  --cal-booked-border: rgba(200,0,0,0.4);
  --cal-own-bg: rgba(0,120,255,0.2);
  --cal-own-border: rgba(0,120,255,0.4);
  --cal-selected-bg: rgba(0, 170, 80, 0.15);
  --cal-selected-border: rgba(0, 170, 80, 0.5);
  --cal-selected-text: #00884a;
}
@media (min-width: 1440px) {
  :root { --pico-container-max-width: 1400px; }
}

/* ── Utility classes kept from base ── */
.row { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 200px; }
.muted { color: var(--color-text-muted); font-size: 0.9em; }
.faded { opacity: 0.45; }
tr.in-progress { background: var(--color-bg-alt, #f8f5f0); }
.badge-warn { display: inline-block; font-size: 0.75em; padding: 0.1em 0.4em; border-radius: 3px; background: #f0ad4e; color: #fff; vertical-align: middle; }
.success { color: var(--color-primary); animation: flash-success 1s ease; }
@keyframes flash-success {
  0%   { background: var(--color-primary); color: #fff; }
  100% { background: transparent; }
}
.error { color: var(--color-danger); }

/* Hide admin sections by default; JS will reveal for admins */
.admin-only { display: none; }

/* ── Flash alerts ── */
.flash { padding:.75rem 1rem; border-radius:var(--pico-border-radius); background:var(--color-primary); color:#fff; margin-bottom:1rem; }

/* ── Tab buttons (admin page, landing tabs) ── */
.tab-bar { display:flex; gap:.25rem; flex-wrap:wrap; margin-bottom:.75rem; align-items:center; }
.tab-btn { background:none; border:1px solid var(--color-border); border-radius:var(--pico-border-radius); padding:.4rem .8rem; cursor:pointer; font-size:.9rem; color:var(--color-text-muted); text-decoration:none; line-height:1.2; display:inline-block; }
a.tab-btn { --pico-text-decoration: none; }
.tab-btn:hover { background:var(--color-surface); color:var(--color-text); }
.tab-btn.active { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }

/* ── Button variants ── */
.btn-secondary { background:var(--color-surface); color:var(--color-text); border:1px solid var(--color-border); }
.btn-danger { color:var(--color-danger); border-color:var(--color-danger); background:transparent; }
.btn-danger:hover { background:var(--color-danger); color:#fff; }
.btn-sm { font-size:.85em; padding:.3rem .5rem; }

/* ── Section widths (replace inline margin/max-width) ── */
.section-narrow { max-width:400px; margin:2rem auto; }
.section-form { max-width:600px; margin:2rem auto; }
.section-medium { max-width:700px; margin:2rem auto; }
.section-wide { max-width:900px; margin:2rem auto; }
.section-admin { max-width:960px; margin:2rem auto; }

/* ── Form inline row (replace inline flex) ── */
.form-inline { display:flex; gap:.5rem; align-items:end; flex-wrap:wrap; }

/* ── Input width utilities ── */
.w-xs { width:5rem !important; }
.w-sm { width:7rem !important; }
.w-md { width:9rem !important; }

/* ── Spacing utilities ── */
.mt-1 { margin-top:.5rem; }
.mt-2 { margin-top:1rem; }
.mt-3 { margin-top:1.5rem; }
.mt-4 { margin-top:2rem; }
.mb-2 { margin-bottom:1rem; }
.text-center { text-align:center; }
.text-right { text-align:right; }

/* ── Card container ── */
.card { background:var(--color-surface); border:1px solid var(--color-border-light); border-radius:.75rem; padding:1rem; }

/* ── Inline form (display:inline) ── */
.inline { display:inline; }
.hidden { display:none; }

/* ── Landing tabs card ── */
.landing-tabs { background:var(--pico-background-color,#fff); border:1px solid var(--color-border-light); border-radius:.75rem; padding:1rem; box-shadow:0 2px 8px rgba(0,0,0,0.05); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

/* ── Modal helpers ── */
.modal-body { padding:1.5rem; }
.modal-actions { display:flex; gap:1rem; justify-content:flex-end; margin-top:1.5rem; }
dialog.modal { border:none; padding:0; }

/* ── Year filter controls ── */
.year-filter { display:flex; gap:.5rem; align-items:center; margin-left:auto; }

/* ── Footer inner ── */
.footer-inner { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between; }

/* ── Calendar minimal styles ── */
.cal-header { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 0.5rem 0; }
.cal-title { font-weight: 600; min-width: 14ch; text-align: center; }
.cal-header button { padding: 0.25rem 0.5rem; }
.cal-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; user-select: none; }
.cal-cell { padding: 0.5rem; text-align: center; border-radius: 6px; }
a.cal-cell { color: inherit; text-decoration: none; cursor: pointer; }
a.cal-cell:visited { color: inherit; }
/* Year view clickable mini-cells */
a.mini-cell { color: inherit; text-decoration: none; }
a.mini-cell:visited { color: inherit; }
.cal-dow { font-weight: 600; background: none; cursor: default; }
/* Calendar legend */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(0,0,0,0.02);
  border-radius: 4px;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.1);
  display: inline-block;
}

.legend-available {
  background: var(--pico-background-color, #fff);
  border: 1px solid var(--color-border);
}

.legend-booked {
  background: var(--cal-booked-bg);
  border: 1px solid var(--cal-booked-border);
}

.legend-own-booked {
  background: var(--cal-own-bg);
  border: 1px solid var(--cal-own-border);
}

.legend-selection {
  background: var(--cal-selected-bg);
  border: 1px solid var(--cal-selected-border);
}

.cal-weeknum { color: var(--color-text-muted); font-weight: 600; }
.cal-other { opacity: 0.45; }
.cal-booked {
  background: var(--cal-booked-bg);
  color: #900;
  cursor: not-allowed;
  border: 1px solid var(--cal-booked-border);
}
.cal-own-booked {
  background: var(--cal-own-bg);
  color: #006;
  cursor: pointer;
  border: 1px solid var(--cal-own-border);
}
.cal-disabled { opacity: 0.35; cursor: not-allowed; }
.cal-today { outline: 2px solid rgba(0,120,255,0.35); }
.cal-selected { background: var(--cal-selected-bg); border: 1px solid var(--cal-selected-border); }
.cal-checkin {
  background: linear-gradient(to bottom right, transparent 0%, transparent 50%, rgba(0,170,80,0.3) 50%);
  border: 1px solid var(--cal-selected-border);
  position: relative;
}
.cal-checkin::after {
  content: "CHECK IN";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}
.cal-checkout {
  background: linear-gradient(to bottom right, rgba(0,170,80,0.3) 0%, rgba(0,170,80,0.3) 50%, transparent 50%);
  border: 1px solid var(--cal-selected-border);
  position: relative;
}
.cal-checkout::after {
  content: "CHECK OUT";
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}

/* Booked check-in/check-out styling (red colors) - no text */
.cal-booked-checkin {
  background: linear-gradient(to bottom right, transparent 0%, transparent 50%, rgba(200,0,0,0.3) 50%);
  border: 1px solid rgba(200,0,0,0.6);
  position: relative;
  cursor: pointer;
}
a.cal-booked-checkin:hover {
  background: linear-gradient(to bottom right, transparent 0%, transparent 50%, rgba(200,0,0,0.5) 50%);
  border-color: rgba(200,0,0,0.9);
}
.cal-booked-checkout {
  background: linear-gradient(to bottom right, rgba(200,0,0,0.3) 0%, rgba(200,0,0,0.3) 50%, transparent 50%);
  border: 1px solid rgba(200,0,0,0.6);
  position: relative;
  cursor: pointer;
}
a.cal-booked-checkout:hover {
  background: linear-gradient(to bottom right, rgba(200,0,0,0.5) 0%, rgba(200,0,0,0.5) 50%, transparent 50%);
  border-color: rgba(200,0,0,0.9);
}

/* Own booking check-in/check-out styling (blue colors) - no text */
.cal-own-booked-checkin {
  background: linear-gradient(to bottom right, transparent 0%, transparent 50%, rgba(0,120,255,0.3) 50%);
  border: 1px solid rgba(0,120,255,0.6);
  position: relative;
  cursor: pointer;
}
a.cal-own-booked-checkin:hover {
  background: linear-gradient(to bottom right, transparent 0%, transparent 50%, rgba(0,120,255,0.5) 50%);
  border-color: rgba(0,120,255,0.9);
}
.cal-own-booked-checkout {
  background: linear-gradient(to bottom right, rgba(0,120,255,0.3) 0%, rgba(0,120,255,0.3) 50%, transparent 50%);
  border: 1px solid rgba(0,120,255,0.6);
  position: relative;
  cursor: pointer;
}
a.cal-own-booked-checkout:hover {
  background: linear-gradient(to bottom right, rgba(0,120,255,0.5) 0%, rgba(0,120,255,0.5) 50%, transparent 50%);
  border-color: rgba(0,120,255,0.9);
}
.cal-inrange { background: rgba(0,170,80,0.12); }

/* Adjacent booking transitions - green to red diagonal */
.cal-adjacent-start {
  background: linear-gradient(to bottom right, rgba(200,0,0,0.3) 0%, rgba(200,0,0,0.3) 50%, rgba(0,170,80,0.3) 50%);
  border: 1px solid var(--cal-selected-border);
  position: relative;
  cursor: pointer;
}
.cal-adjacent-start::after {
  content: "CHECK IN";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}

.cal-adjacent-end {
  background: linear-gradient(to bottom right, rgba(0,170,80,0.3) 0%, rgba(0,170,80,0.3) 50%, rgba(200,0,0,0.3) 50%);
  border: 1px solid rgba(200,0,0,0.6);
  position: relative;
  cursor: pointer;
}
.cal-adjacent-end::after {
  content: "CHECK OUT";
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 8px;
  font-weight: bold;
  color: rgba(200,0,0,0.8);
  line-height: 1;
}

/* Own booking adjacent to other bookings - blue to red diagonal, no text */
.cal-own-adjacent-start {
  background: linear-gradient(to bottom right, rgba(200,0,0,0.3) 0%, rgba(200,0,0,0.3) 50%, rgba(0,120,255,0.3) 50%);
  border: 1px solid rgba(0,120,255,0.6);
  position: relative;
  cursor: pointer;
}

/* Other booking adjacent to own bookings - red to blue diagonal, no text */
.cal-other-adjacent-start {
  background: linear-gradient(to bottom right, rgba(0,120,255,0.3) 0%, rgba(0,120,255,0.3) 50%, rgba(200,0,0,0.3) 50%);
  border: 1px solid rgba(200,0,0,0.6);
  position: relative;
  cursor: pointer;
}

/* New booking adjacent to own bookings - green to blue diagonal */
.cal-new-adjacent-to-own {
  background: linear-gradient(to bottom right, rgba(0,120,255,0.3) 0%, rgba(0,120,255,0.3) 50%, rgba(0,170,80,0.3) 50%);
  border: 1px solid var(--cal-selected-border);
  position: relative;
  cursor: pointer;
}
a.cal-new-adjacent-to-own:hover {
  background: linear-gradient(to bottom right, rgba(0,120,255,0.5) 0%, rgba(0,120,255,0.5) 50%, rgba(0,170,80,0.5) 50%);
}
.cal-new-adjacent-to-own::after {
  content: "CHECK IN";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}

/* Own booking adjacent to new bookings - green to blue diagonal */
.cal-own-adjacent-to-new {
  background: linear-gradient(to bottom right, rgba(0,170,80,0.3) 0%, rgba(0,170,80,0.3) 50%, rgba(0,120,255,0.3) 50%);
  border: 1px solid rgba(0,120,255,0.6);
  position: relative;
  cursor: pointer;
}
a.cal-own-adjacent-to-new:hover {
  background: linear-gradient(to bottom right, rgba(0,170,80,0.5) 0%, rgba(0,170,80,0.5) 50%, rgba(0,120,255,0.5) 50%);
}
.cal-own-adjacent-to-new::after {
  content: "CHECK OUT";
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}

/* New booking adjacent to other bookings - red to green diagonal */
.cal-new-adjacent-to-other {
  background: linear-gradient(to bottom right, rgba(200,0,0,0.3) 0%, rgba(200,0,0,0.3) 50%, rgba(0,170,80,0.3) 50%);
  border: 1px solid var(--cal-selected-border);
  position: relative;
  cursor: pointer;
}
a.cal-new-adjacent-to-other:hover {
  background: linear-gradient(to bottom right, rgba(200,0,0,0.5) 0%, rgba(200,0,0,0.5) 50%, rgba(0,170,80,0.5) 50%);
}
.cal-new-adjacent-to-other::after {
  content: "CHECK IN";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}

/* Other booking adjacent to new bookings - green to red diagonal */
.cal-other-adjacent-to-new {
  background: linear-gradient(to bottom right, rgba(0,170,80,0.3) 0%, rgba(0,170,80,0.3) 50%, rgba(200,0,0,0.3) 50%);
  border: 1px solid rgba(200,0,0,0.6);
  position: relative;
  cursor: pointer;
}
a.cal-other-adjacent-to-new:hover {
  background: linear-gradient(to bottom right, rgba(0,170,80,0.5) 0%, rgba(0,170,80,0.5) 50%, rgba(200,0,0,0.5) 50%);
}
.cal-other-adjacent-to-new::after {
  content: "CHECK OUT";
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 8px;
  font-weight: bold;
  color: var(--cal-selected-text);
  line-height: 1;
}

.cal-summary { margin-top: 0.5rem; font-weight: 600; }
.cal-unpriced { position: relative; cursor: not-allowed; }
.cal-unpriced::after { content: ''; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* ── Navigation styles ── */
.nav {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-inner {
  display: flex; align-items: center; gap: 0.75rem;
  padding: .5rem 1rem;
  max-width: 1400px; margin: 0 auto;
  position: relative;
}

/* ── CAPTCHA Styling ── */
.captcha-group {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  margin-bottom: 1rem;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#captchaCanvas {
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  background: white;
}

#captchaInput {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  font-size: 1rem;
}

#refreshCaptcha {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* ── Price breakdown styling ── */
.price-breakdown {
  text-align: left;
  padding: 12px;
  background: var(--color-surface);
  border-radius: 6px;
  border: 1px solid var(--color-border);
  margin-top: 8px;
  font-size: 14px;
}

.breakdown-header {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.breakdown-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.breakdown-line:last-child {
  border-bottom: none;
}

.total-line {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 2px solid var(--color-primary);
  font-size: 16px;
  color: var(--color-primary);
  border-bottom: none !important;
}
.user-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.user-status a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
}
.user-status a:hover {
  color: white;
  text-decoration: underline;
}
.nav-selects {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.lang-select, .currency-select {
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: inherit;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
}
.lang-select:focus, .currency-select:focus {
  outline: 2px solid rgba(255,255,255,0.4);
  outline-offset: 1px;
}
.lang-select option, .currency-select option {
  background: var(--pico-background-color, #fff);
  color: var(--color-text, #333);
}
.mobile-lang-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
}
.mobile-lang-row .lang-select,
.mobile-lang-row .currency-select {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--pico-background-color, #fff);
}
.mobile-lang-row .lang-select:focus,
.mobile-lang-row .currency-select:focus {
  outline-color: var(--color-primary);
}
.brand a { text-decoration: none; color: inherit; font-weight: 700; letter-spacing: .2px; font-size: 1.05rem; }
.hamburger { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: .25rem .5rem; border-radius: 6px; color: white; }
.menu { position: absolute; right: 0; top: 100%; background: var(--pico-background-color, #fff); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); width: 240px; display: none; flex-direction: column; margin-top: .25rem; }
.menu.open { display: block; }
.menu ul { list-style: none; margin: 0; padding: .25rem 0; display: block; }
.menu li { display: block; width: 100%; margin: 0; padding: 0; }
nav.menu a, nav.menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: .6rem 1rem; cursor: pointer; text-decoration: none; color: var(--color-text); white-space: normal; margin: 0; }
.menu a:hover, .menu button:hover { background: var(--color-surface); }

/* ── Hero + gallery ── */
.hero { margin: .5rem 0 1rem 0; padding: 1rem; border-radius: 12px; background: linear-gradient(135deg, rgba(0,120,255,.08), rgba(26,123,191,.08)); }
.hero h1 { margin: 0 0 .25rem 0; }
.hero p { margin: 0; color: #444; }
.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 1rem 0; }
.gallery .ph { height: 120px; border-radius: 10px; background: var(--color-border); background-size: cover; background-position: center; }

/* ── Booking widget ── */
.booking-bar { display: flex; align-items: end; gap: .75rem; margin-top: .5rem; flex-wrap: wrap; }
.guest-selection {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .75rem 0 .5rem 0;
  padding: .5rem 0;
  border-top: 1px solid rgba(0,0,0,0.1);
}
.guest-selection input {
  width: 4rem;
}
.booking-action {
  margin-top: .75rem;
  text-align: center;
}
.btn-primary { background: var(--color-primary); color: #fff; border: none; border-radius: 8px; padding: .6rem .9rem; cursor: pointer; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-link { background: none; color: var(--color-primary); border: none; cursor: pointer; text-decoration: underline; padding: 0; font-size: inherit; }

/* ── Modal ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 1100; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--pico-background-color, #fff); color: var(--color-text); width: min(600px, 95vw); max-height: 85vh; overflow-y: auto; border-radius: 12px; padding: 1.5rem; box-shadow: 0 12px 32px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
.modal header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.modal header h3 { margin: 0; }
.modal .close { background: none; border: none; font-size: 1.2rem; cursor: pointer; }

/* ── Booking confirmation modal ── */
.booking-details, .profile-details {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
}

.booking-details h4, .profile-details h4 {
  margin: 0 0 0.75rem 0;
  color: var(--color-primary);
  font-size: 1.1em;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  font-weight: 500;
  color: var(--color-text-muted);
}

.detail-row span:last-child {
  color: var(--color-text);
  font-weight: 600;
}

/* Breakdown line inside detail rows */
.detail-breakdown {
  flex-basis: 100%;
  text-align: right;
  color: var(--color-text-muted);
  font-size: 0.85em;
  margin-top: 2px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row label span {
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.editable-field {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.95em;
}

.editable-field:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 170, 119, 0.2);
}

/* ── Responsive navigation ── */
@media (max-width: 768px) {
  .user-status {
    flex: 1 1 0;
    font-size: 0.8rem;
    max-width: calc(100vw - 8rem);
  }

  .nav-selects {
    display: none;
  }
}

.readonly-field {
  padding: 0.5rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-muted);
  font-size: 0.95em;
}

.small-link {
  margin-top: 0.5rem;
  text-align: right;
}

.small-link a {
  font-size: 0.9em;
  color: var(--color-primary);
  text-decoration: none;
}

.small-link a:hover {
  text-decoration: underline;
}

/* ── Year overview ── */
.year-container { max-width: 1200px; margin: 0 auto; }
.year-controls { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 0.5rem 0; }
.year-controls strong { font-weight: 600; min-width: 6ch; text-align: center; }
.months-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.mini-cal { border: 1px solid var(--color-border-light); border-radius: 8px; padding: 0.5rem; background: var(--pico-background-color, #fff); }
.mini-cal h4 { margin: 0.25rem 0 0.5rem; font-size: 1rem; font-weight: 600; text-align: center; }
.mini-grid { display: grid; grid-template-columns: 1.2fr repeat(7, 1fr); gap: 2px; }
.mini-cell { text-align: center; padding: 0.25rem; border-radius: 4px; font-size: 0.8rem; }
.mini-dow { font-weight: 600; font-size: 0.75rem; color: var(--color-text-muted); }
.mini-weeknum { color: var(--color-text-muted); font-weight: 600; }
.mini-other { opacity: 0.3; }
.mini-booked { background: #ddd !important; color: var(--color-text-muted); border: 1px solid #cfcfcf; }
.mini-available { background: var(--pico-background-color, #fff); border: 1px solid var(--color-border-light); }
.mini-past { background: var(--color-surface-alt); color: #777; }
.mini-unpriced { background: #ffecec !important; border: 1px solid #ffcccc; color: #a55; }
.legend { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.85rem; margin: 0.25rem 0 0.75rem; }
.swatch { width: 12px; height: 12px; border-radius: 2px; border: 1px solid rgba(0,0,0,0.1); display: inline-block; }
.row-booked { background: #ddd !important; color: var(--color-text-muted); }
.row-past { background: var(--color-surface-alt) !important; color: #777; }

/* ── Price bucket colors ── */
.p0 { background: #e8f5e9; }
.p1 { background: #c8e6c9; }
.p2 { background: #ffe0b2; }
.p3 { background: #ffcc80; }
.p4 { background: #ffab91; }
/* Propagate bucket colors to table cells (Pico sets td background) */
tr.p0 > td { background: #e8f5e9; }
tr.p1 > td { background: #c8e6c9; }
tr.p2 > td { background: #ffe0b2; }
tr.p3 > td { background: #ffcc80; }
tr.p4 > td { background: #ffab91; }
tr.row-booked > td { background: #ddd; color: var(--color-text-muted); }
.week-row-link { cursor: pointer; }
.week-row-link:hover > td { filter: brightness(0.92); }
tr.row-past > td { background: var(--color-surface-alt); color: #777; }

/* ── Hero full-width ── */
body { overflow-x: hidden; }
/* Hero sits outside <main> so no breakout hack needed. */
.hero-full {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a6b5a 0%, #0d3b4f 40%, #1a3a5c 100%);
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.65) 100%);
}
.hero-text {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff !important;
  padding: 2rem 1.5rem;
  max-width: 800px;
}
.hero-text h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
}
.hero-text p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  color: rgba(255,255,255,0.95) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.btn-hero {
  display: inline-block;
  background: var(--color-primary);
  color: #fff !important;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-hero:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* ── Gallery section ── */
.gallery-section { margin: 2rem 0; }
.gallery .ph { height: 220px; }
.ph-1 { background: url('/static/images/ph-1.svg') center/cover no-repeat !important; }
.ph-2 { background: url('/static/images/ph-2.svg') center/cover no-repeat !important; }
.ph-3 { background: url('/static/images/ph-3.svg') center/cover no-repeat !important; }
.ph-4 { background: url('/static/images/ph-4.svg') center/cover no-repeat !important; }
.ph-5 { background: url('/static/images/ph-5.svg') center/cover no-repeat !important; }
.ph-6 { background: url('/static/images/ph-6.svg') center/cover no-repeat !important; }
.gallery-img {
  height: 220px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.gallery-img:hover { transform: scale(1.02); }

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox-overlay img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.lightbox-prev, .lightbox-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  font-size: 3rem; line-height: 1; padding: 0.5rem 1rem;
  cursor: pointer; z-index: 1001; border-radius: 6px;
  transition: background 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close {
  position: fixed; top: 1rem; right: 1.5rem;
  background: none; border: none; color: #fff;
  font-size: 2.5rem; cursor: pointer; z-index: 1001;
  line-height: 1; padding: 0;
}
.lightbox-caption {
  position: fixed; bottom: 5rem;
  left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 1001;
}
.lightbox-counter {
  position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 0.9rem;
  z-index: 1001;
}
.lightbox-thumbs {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; gap: 6px; padding: 0.75rem 1rem;
  overflow-x: auto; justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 1001;
}
.lightbox-thumb {
  flex: 0 0 60px; height: 45px;
  background-size: cover; background-position: center;
  border-radius: 4px; cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6; transition: opacity 0.2s, border-color 0.2s;
}
.lightbox-thumb:hover { opacity: 0.9; }
.lightbox-thumb.active { opacity: 1; border-color: #fff; }

/* ── Highlights strip ── */
.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}
.highlight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 0.75rem;
  min-width: 120px;
  flex: 1 1 120px;
  max-width: 180px;
}
.highlight-icon { font-size: 1.8rem; line-height: 1; }
.highlight-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ── Responsive: gallery + highlights ── */
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .highlight-card { min-width: 100px; max-width: 150px; }
}

/* ── Pico conflict fixes ── */

/* Pico classless styles all buttons as primary — reset for our custom buttons */
.btn, .tab-btn, .hamburger, .close, .menu button {
  --pico-background-color: transparent;
  --pico-border-color: transparent;
  --pico-color: inherit;
  width: auto;
  margin: 0;
}

/* Ensure nav stays full-bleed outside Pico's main container */
.nav { width: 100%; max-width: none; }

/* Prevent Pico from adding padding to sections inside main */
main > section { padding: 0; }

/* ── Pricing guide ── */
.pricing-guide { margin-bottom: 1.5rem; border: 1px solid var(--color-border-light); border-radius: var(--pico-border-radius); }
.pricing-guide summary { cursor: pointer; padding: 0.75rem 1rem; font-weight: 600; color: var(--color-text-muted); }
.pricing-guide-body { padding: 0 1rem 1rem; font-size: 0.9em; line-height: 1.6; }
.pricing-guide-body h4 { margin: 1rem 0 0.25rem; font-size: 0.95em; }
.pricing-guide-body p, .pricing-guide-body ol { margin: 0.25rem 0 0.5rem; }
.pricing-guide-body ol { padding-left: 1.5em; }
.pricing-guide-body li { margin-bottom: 0.4rem; }

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e0e0e0;
    --color-text-muted: #999;
    --color-border: #444;
    --color-border-light: #333;
    --color-surface: #1e1e1e;
    --color-surface-alt: #252525;
  }
  .menu { background: var(--pico-background-color); border-color: var(--color-border); }
  .menu a, .menu button { color: var(--color-text); }
  .menu a:hover, .menu button:hover { background: var(--color-surface); }
  .modal { background: var(--pico-background-color); color: var(--color-text); }
  .ph-1, .ph-2, .ph-3, .ph-4, .ph-5, .ph-6 { opacity: 0.75; }
  .highlight-card { background: var(--color-surface); border-color: var(--color-border); }

  /* ── Year overview dark mode ── */
  /* Price bucket colors — darker, more saturated versions */
  .p0 { background: #1b3a1b; color: #b0d8b0; }
  .p1 { background: #1e3e1e; color: #a8d0a8; }
  .p2 { background: #3a2e1a; color: #e0c898; }
  .p3 { background: #3e2a10; color: #e0b878; }
  .p4 { background: #3e2018; color: #e0a088; }
  tr.p0 > td { background: #1b3a1b; color: #b0d8b0; }
  tr.p1 > td { background: #1e3e1e; color: #a8d0a8; }
  tr.p2 > td { background: #3a2e1a; color: #e0c898; }
  tr.p3 > td { background: #3e2a10; color: #e0b878; }
  tr.p4 > td { background: #3e2018; color: #e0a088; }

  /* Mini-calendar cells */
  .mini-cal { background: var(--color-surface); border-color: var(--color-border); }
  .mini-booked { background: #333 !important; color: #888; border-color: #444; }
  .mini-available { background: var(--color-surface); border-color: var(--color-border); }
  .mini-past { background: var(--color-surface-alt); color: #666; }
  .mini-unpriced { background: #3a1a1a !important; border-color: #4a2020; color: #c88; }

  /* Table rows */
  tr.row-booked > td { background: #333; color: #888; }
  tr.row-past > td { background: var(--color-surface-alt); color: #666; }
  .week-row-link:hover > td { filter: brightness(1.2); }

  /* Legend swatches inherit bucket colors; ensure legend text is readable */
  .legend { color: var(--color-text); }
  .swatch { border-color: rgba(255,255,255,0.15); }
}
