:root {
  --ink: #1a2b24;
  --accent: #1f4a3a;
  --accent-dark: #102820;
  --accent-light: #3d6b58;
  --copper: #b56a2b;
  --blush: #e8efe8;
  --paper: #f4efe6;
  --card: #fffdf8;
  --line: #d7ccb8;
  --muted: #5c6a63;
  --bg: #ece7dc;
  --hero-shade: linear-gradient(180deg, rgba(16, 40, 32, 0.35) 0%, rgba(16, 40, 32, 0.22) 38%, rgba(16, 40, 32, 0.82) 100%);
  --tag-1: #dceee4;
  --tag-1-ink: #14532d;
  --tag-2: #dbeafe;
  --tag-2-ink: #1e3a8a;
  --radius: 4px;
  --radius-btn: 4px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --shadow: 0 18px 40px rgba(16, 40, 32, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.55;
  overflow-x: clip;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.top-inner, .wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; min-width: 0; }

.top {
  background: var(--accent-dark);
  color: #f4efe6;
}
body:not(:has(.app)) .top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  background: linear-gradient(180deg, rgba(16, 40, 32, 0.72), transparent);
}
.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  gap: 16px;
}
.logo {
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
  font-size: 26px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: #f7f1e6;
}
.logo small {
  display: block;
  font-family: var(--font);
  font-weight: 600;
  font-size: 10px;
  opacity: 0.85;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
}
.top nav { display: flex; gap: 4px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.top nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.top nav a:hover { background: rgba(255, 255, 255, 0.1); }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(244, 239, 230, 0.35);
  background: rgba(16, 40, 32, 0.35);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 10px 9px;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #f4efe6;
  border-radius: 1px;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }

.btn {
  display: inline-block;
  background: #f4efe6;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  border: 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 20px rgba(16, 40, 32, 0.18);
}
.btn:hover { background: #fff; transform: translateY(-2px); }

.kicker {
  color: var(--copper);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: 40px; line-height: 1.12; margin: 12px 0; }
.lead { font-size: 18px; color: var(--muted); max-width: min(36rem, 100%); line-height: 1.6; overflow-wrap: anywhere; }

.hero {
  position: relative;
  min-height: 100svh;
  color: #f7f1e6;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero-shade { position: absolute; inset: 0; background: var(--hero-shade); }
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.7fr);
  gap: 40px;
  align-items: end;
  padding: 120px 28px 72px;
  width: 100%;
}
.hero-inner > * { min-width: 0; }
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  margin: 8px 0 16px;
  color: #f7f1e6;
  overflow-wrap: anywhere;
}
.kicker.light, .lead.light { color: #efe8d8; }
.lead.light { font-size: 19px; max-width: 38rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn-ghost {
  background: transparent;
  color: #f7f1e6;
  border: 1px solid rgba(247, 241, 230, 0.55);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(247, 241, 230, 0.12); color: #f7f1e6; }

.local-card {
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 26px 28px;
  border-top: 3px solid var(--copper);
  backdrop-filter: blur(8px);
}
.local-name {
  font-family: var(--display);
  font-weight: 650;
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--accent);
}
.local-card p { margin: 4px 0; }
.local-hours { color: var(--muted); }
.local-tel { font-weight: 700; margin-top: 12px !important; }

.section { padding: 88px 0 28px; min-width: 0; }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 14px; }
.section-lead { color: var(--muted); max-width: 42rem; margin: 0 0 32px; font-size: 17px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 650;
}
.filters button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.catalog-grid, .services-grid, .lugares-grid, .predio-grid, .cerca-grid, .profesionales {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 22px;
  min-width: 0;
}
.card-item, .service-card, .lugar-card, .predio-card, .profesional-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-item, .service-card, .lugar-card {
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
  font: inherit;
  color: inherit;
  display: block;
}
.card-item:hover, .service-card:hover, .lugar-card:hover, .predio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.card-item img, .service-card img, .lugar-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.card-item:hover img, .lugar-card:hover img { transform: scale(1.05); }
.card-item div, .service-card div, .lugar-card div, .predio-card div { padding: 20px 20px 22px; }
.card-cat, .service-cat {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 700;
}
.card-item h3, .service-card h3, .lugar-card h3, .predio-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}
.card-item p, .service-card p, .lugar-card p, .predio-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.card-meta { margin-top: 12px !important; font-size: 13px !important; }
.card-price, .service-price { margin-top: 12px !important; font-weight: 700; color: var(--accent) !important; font-size: 18px !important; }
.card-price small { font-weight: 500; font-size: 12px; color: var(--muted); }
.predio-card { cursor: default; }
.predio-card img { width: 100%; height: 280px; object-fit: cover; }

.place-banner, .equipo-banner {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.profesional-card { text-align: center; }
.profesional-card img { width: 100%; height: 260px; object-fit: cover; }
.profesional-card h3 { margin: 18px 16px 4px; font-size: 20px; }
.pro-rol { margin: 0 16px 8px; color: var(--copper); font-size: 13px; font-weight: 700; }
.profesional-card p:last-child { margin: 0 16px 22px; font-size: 14px; color: var(--muted); }

.reserva-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 36px;
  background: var(--accent-dark);
  color: #f4efe6;
  padding: 48px;
  border-radius: var(--radius);
}
.reserva-card h2 { margin: 8px 0 12px; }
.reserva-card p { color: #e4ddd0; }
.reserva-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.reserva-form label { color: #e4ddd0; margin-top: 0; }
.reserva-form .full { grid-column: 1 / -1; }
.reserva-form textarea { min-height: 88px; resize: vertical; }
.reserva-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.reserva-card .btn { background: #f4efe6; color: var(--accent-dark); }
.reserva-total { margin: 0; font-weight: 700; }

.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.modules article {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border-top: 3px solid var(--accent);
}
.modules h3 { margin: 0 0 10px; font-size: 20px; color: var(--accent); }
.modules p { color: var(--muted); line-height: 1.55; margin: 0; font-size: 15px; }
.info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ficha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 40, 32, 0.62);
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
}
.ficha-overlay[hidden] { display: none; }
.ficha-modal {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 720px;
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  position: relative;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}
.ficha-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  border: 0;
  background: rgba(244, 239, 230, 0.95);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}
.ficha-photo {
  width: 100%;
  height: min(42vh, 340px);
  object-fit: cover;
  display: block;
}
.ficha-copy { padding: 8px 28px 32px; }
.ficha-modal .kicker, .ficha-modal h2, .ficha-modal p, .ficha-modal dl, .ficha-modal .btn { margin-left: 28px; margin-right: 28px; }
.ficha-copy .kicker, .ficha-copy h2, .ficha-copy p, .ficha-copy dl, .ficha-copy .btn { margin-left: 0; margin-right: 0; }
.ficha-modal h2, .ficha-copy h2 { font-size: 32px; margin-top: 4px; }
.ficha-modal .btn, .ficha-copy .btn { margin-bottom: 8px; display: inline-block; }
.ficha-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 28px 22px; }
.ficha-copy .ficha-meta { margin: 18px 0 22px; }
.ficha-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ficha-meta dd { margin: 4px 0 0; font-weight: 700; }
.ficha-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 28px 18px !important;
}
.ficha-copy .ficha-amenities { margin: 0 0 18px !important; }
.ficha-amenities span {
  background: var(--blush);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--blush);
}
td, th { padding: 14px 12px; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: var(--paper); }
.note { color: var(--muted); font-size: 14px; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.tag.pendiente, .tag.reservado { background: #fef3c7; color: #92400e; }
.tag.confirmada { background: var(--tag-2); color: var(--tag-2-ink); }
.tag.checkin, .tag.en_casa, .tag.en_curso { background: var(--tag-1); color: var(--tag-1-ink); }
.tag.checkout, .tag.terminado, .tag.completa { background: #d1fae5; color: #065f46; }
.tag.cancelada, .tag.cancelado { background: #fee2e2; color: #991b1b; }
.tag.abierta { background: #e0e7ff; color: #3730a3; }

footer { padding: 48px 0 64px; color: var(--muted); font-size: 14px; }

.app { min-height: 100vh; display: grid; grid-template-rows: auto auto auto 1fr; }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 20px 24px 8px;
  background: var(--paper);
}
.toolbar h1 { font-size: 26px; margin: 4px 0; }
.eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stats { display: flex; gap: 8px; padding: 0 24px 12px; flex-wrap: wrap; background: var(--paper); }
.stats button, .stats div {
  background: white;
  border: 1px solid var(--line);
  padding: 8px 12px;
  min-width: 100px;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
}
.stats strong { display: block; font-size: 18px; color: var(--accent); }
.stats .on { border-color: var(--accent); background: var(--blush); }

.workspace { display: grid; grid-template-columns: 1.2fr 0.8fr; min-height: 0; background: var(--paper); }
.list, .detail { padding: 0 24px 32px; }
.row { cursor: pointer; }
.row.on { background: var(--blush); }

.detail {
  background: white;
  border-left: 1px solid var(--line);
  padding: 16px 24px 32px;
  overflow-y: auto;
}
.detail h2 { font-size: 20px; margin: 0 0 4px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; font-size: 14px; }
.meta span { display: block; color: var(--muted); font-size: 12px; }

label { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
input, select, textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-panel {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.btn-panel:hover { background: var(--accent-dark); }

.timeline { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 8px; }
.timeline h3 { font-size: 14px; margin: 0 0 8px; color: var(--accent); }
.timeline p { margin: 6px 0; font-size: 13px; }
.timeline time { display: block; color: var(--copper); font-size: 11px; font-weight: 600; }

.factura-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  font-size: 13px;
}
.factura-box h4 { margin: 0 0 8px; font-size: 13px; color: #166534; }
.factura-box .cae { font-family: ui-monospace, monospace; color: #166534; }

.arca-section {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
}
.arca-section h4 { margin: 0 0 8px; font-size: 13px; color: var(--accent); }

.create {
  display: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 0 24px 12px;
}
.create.open { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.create button { align-self: end; }
.amount { text-align: right; font-variant-numeric: tabular-nums; }
.thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
.row-main { display: flex; align-items: center; gap: 10px; }
.panel-tabs { display: flex; gap: 8px; }
.panel-tabs button {
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}
.panel-tabs button.on { background: white; color: var(--accent); border-color: white; }
.detail-photo { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; margin: 10px 0; }
.trabajos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 24px 32px;
  background: var(--paper);
}
.trabajo-admin { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.trabajo-admin img { width: 100%; height: 130px; object-fit: cover; }
.trabajo-admin div { padding: 12px; }
.trabajo-admin h3 { margin: 0 0 6px; font-size: 15px; }
.panel-hidden { display: none !important; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.cupo-bar {
  height: 8px;
  background: var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}
.cupo-bar span { display: block; height: 100%; background: var(--accent); }

.map-block {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: stretch;
}
.map-block .map-embed { grid-column: 1 / -1; }
.map-embed {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 420px;
  min-height: 360px;
  width: 100%;
  background: #d7e0dc;
  isolation: isolate;
  border: 1px solid var(--line);
}
.map-embed .map-canvas,
.map-embed .leaflet-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 360px;
  min-width: 0;
  display: block;
  background: #d7e0dc;
}
.map-fallback {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 14px;
  padding: 16px;
  text-align: center;
}
.map-caption { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.map-caption a { color: var(--accent); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .top-inner { flex-wrap: wrap; }
  .top nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-bottom: 16px;
  }
  .top.is-open nav { display: flex; }
  .top.is-open { background: var(--accent-dark); }
  .hero-inner, .reserva-card, .reserva-form, .ficha-meta, .info-grid, .workspace, .create.open, .modules, .map-block {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 100svh; }
  .hero-inner { padding: 104px 20px 48px; }
  .hero-inner > * { min-width: 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .top-inner, .toolbar, .wrap { padding-left: 20px; padding-right: 20px; }
  .section { padding: 64px 0 16px; }
  .reserva-card { padding: 28px 20px; }
  .map-embed, .map-embed .map-canvas, .map-embed .leaflet-container { height: 320px; min-height: 320px; }
  .ficha-overlay { padding: 12px; align-items: start; }
  .ficha-modal { max-height: none; }
  .ficha-photo { height: 220px; }
}
