/* SURPASS — Identidad Orgánica y Editorial (Cero Estética Genérica de IA) */
:root {
  --bg: #FAF9F6;
  --sand: #F3EFE6;
  --surface: #FFFFFF;
  --border: #E5DFD3;
  --ink: #1F2421;
  --muted: #5F6B64;
  --green: #1B4332;
  --green-soft: #E6F2EC;
  --river: #1D4E89;
  --river-soft: #E8F0FA;
  --amber: #D97706;
  --amber-soft: #FEF3C7;
  --red: #B91C1C;
  --red-soft: #FEE2E2;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(27, 67, 50, 0.06);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.015em;
  margin-top: 0;
  color: var(--ink);
}
a { color: var(--river); text-decoration: none; }

/* Header superior limpio */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--green); color: #FAF9F6;
  display: grid; place-items: center; font-weight: 700;
}
.brand-name { font-family: 'Fraunces', Georgia, serif; font-size: 1.25rem; font-weight: 700; color: var(--green); }
.brand-sub { font-size: 0.72rem; color: var(--muted); display: block; margin-top: -3px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* Contenedor principal con espacio para Bottom Nav en móvil */
.container { max-width: 1120px; margin: 0 auto; padding: 20px 16px 96px; }

/* Secciones delimitadas y líneas divisoras */
.section { margin-bottom: 32px; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-header h2 { margin: 0; font-size: 1.45rem; }
.section-header p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }

/* Tarjetas editoriales */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 18px; }
.card-sand { background: var(--sand); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #FAF9F6; }
.btn-primary:hover { background: #143325; }
.btn-river { background: var(--river); color: #FFF; }
.btn-amber { background: var(--amber); color: #FFF; }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: #FECACA; }
.btn-sm { padding: 6px 11px; font-size: 0.82rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* Código de colores semántico (Badges) */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: #92400E; }
.badge-blue  { background: var(--river-soft); color: var(--river); }
.badge-red   { background: var(--red-soft); color: var(--red); }

/* Hero Editorial */
.hero {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: center;
  margin-bottom: 28px;
}
.hero h1 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); line-height: 1.15; margin-bottom: 10px; }
.hero p { color: var(--muted); margin-bottom: 16px; }
.hero-photo { width: 100%; height: 240px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 18px; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

.dest-card img { width: 100%; height: 185px; object-fit: cover; display: block; }
.dest-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.price-tag { font-weight: 700; color: var(--green); font-size: 1.05rem; }

/* Formularios */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 0.84rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #FFF; font-family: inherit; font-size: 0.94rem; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12);
}
.help-text { font-size: 0.78rem; color: var(--muted); }

/* Barra de progreso de 2 pasos */
.stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.step-pill {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.88rem;
}
.step-pill.active { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #FFF; display: grid; place-items: center; font-size: 0.78rem; }

/* Barra porcentual 90% chofer / 10% plataforma */
.split-bar { height: 12px; border-radius: 999px; overflow: hidden; display: flex; background: var(--sand); border: 1px solid var(--border); margin: 8px 0; }
.split-90 { width: 90%; background: var(--green); }
.split-10 { width: 10%; background: var(--amber); }

/* Chips de servicios con iconos */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 0.8rem;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.chip.selected { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 600; }

/* Mapa Leaflet */
.map-box { height: 280px; width: 100%; border-radius: 12px; border: 1px solid var(--border); z-index: 1; }

/* Chat in-app */
.chat-box { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--sand); border-radius: 12px; border: 1px solid var(--border); }
.chat-msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 0.88rem; background: #FFF; border: 1px solid var(--border); }
.chat-msg.mine { align-self: flex-end; background: var(--green-soft); border-color: #B7E4C7; }

/* Bottom Navigation Bar móvil */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.nav-item {
  background: none; border: none; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 0.72rem; font-weight: 600; font-family: inherit; padding: 4px 10px; border-radius: 10px;
}
.nav-item.active { color: var(--green); background: var(--green-soft); }

/* Panel de notificaciones desplegable */
.notif-panel {
  position: fixed; top: 62px; right: 16px; width: min(360px, calc(100vw - 32px));
  max-height: 70vh; overflow-y: auto; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12); padding: 14px; display: none;
}
.notif-panel.open { display: block; }
.notif-dot {
  background: var(--amber); color: #FFF; border-radius: 999px; font-size: 0.7rem;
  padding: 1px 6px; font-weight: 700;
}

/* Modal sencillo */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(31, 36, 33, 0.55); z-index: 70;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--surface); border-radius: 16px; max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 22px; border: 1px solid var(--border);
}

.toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: #FAF9F6; padding: 10px 18px; border-radius: 999px;
  font-size: 0.88rem; display: none; box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { height: 190px; }
}
