
:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211b;
  background: #f3f5f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* Encabezado */
.topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid #e3e8e2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.brand span {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #6b786e;
  margin-left: 8px;
}

.top-note {
  font-size: 14px;
  color: #69756c;
}

/* Distribución principal */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  padding: 18px;
  max-width: 1800px;
  margin: 0 auto;
}

.map-panel,
.side-panel {
  background: #fff;
  border: 1px solid #e1e7e0;
  border-radius: 16px;
  min-width: 0;
}

.map-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 106px);
  overflow: hidden;
}

/* Cabecera del plano */
.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid #edf0ec;
}

.map-head h1 {
  font-size: 18px;
  margin: 0 0 5px;
}

.map-head p {
  font-size: 13px;
  color: #7b857d;
  margin: 0;
}

/* Controles de zoom */
.map-controls {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.map-controls button,
.search-row button {
  border: 1px solid #d8e0d7;
  background: #fff;
  color: #203126;
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 16px;
  cursor: pointer;
}

.map-controls button:hover,
.search-row button:hover {
  background: #f0f5ef;
}

.map-controls #fit {
  font-size: 13px;
}

/* Visor del plano */
.viewport {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 560px;
  background: #eef2ea;
  cursor: grab;
  touch-action: none;
}

.viewport.dragging {
  cursor: grabbing;
}

/* Contenedor que permite mover y ampliar el plano */
.map-content {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

/* Plano renderizado desde el PDF */
.map-content canvas {
  display: block;
  max-width: none;
  user-select: none;
  pointer-events: none;
}

/* Pie del plano */
.map-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  color: #758077;
  font-size: 12px;
  border-top: 1px solid #edf0ec;
}

/* Panel lateral */
.side-panel {
  padding: 23px 21px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #68776b;
}

/* Buscador */
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e0d7;
  border-radius: 9px;
  padding: 12px;
  font: inherit;
  outline: none;
}

.search-row input:focus {
  border-color: #648b5b;
  box-shadow: 0 0 0 3px #e7f0e3;
}

.search-row button {
  background: #2f6d37;
  color: #fff;
  border-color: #2f6d37;
  font-size: 13px;
  font-weight: 700;
}

/* Información del lote */
.info-card {
  border: 1px solid #e3e9e1;
  border-radius: 13px;
  padding: 18px;
}

.info-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #edf4e9;
  color: #47773e;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.info-card h2 {
  font-size: 19px;
  margin: 15px 0 8px;
}

.info-card p {
  font-size: 13px;
  line-height: 1.55;
  color: #68756b;
  margin: 0;
}

.notice {
  margin-top: 16px;
  padding: 12px;
  background: #f6f7f4;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.55;
  color: #5d685f;
}

.notice strong {
  color: #38483b;
}

/* Próxima etapa */
.next-step {
  padding: 0 2px;
}

.next-step strong {
  font-size: 13px;
}

.next-step p {
  font-size: 12px;
  line-height: 1.5;
  color: #6d786f;
  margin: 6px 0 0;
}

/* Botón de cotización */
.quote-button {
  margin-top: auto;
  border: 0;
  border-radius: 10px;
  padding: 14px;
  background: #2f6d37;
  color: white;
  font-size: 14px;
  font-weight: 750;
}

.quote-button:disabled {
  background: #dfe5dc;
  color: #8b958b;
  cursor: not-allowed;
}

/* Tablets y pantallas medianas */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .map-panel {
    min-height: 70vh;
  }

  .viewport {
    min-height: 480px;
  }

  .side-panel {
    order: 2;
  }

  .topbar {
    padding: 0 16px;
  }

  .top-note {
    display: none;
  }
}

/* Celulares */
@media (max-width: 520px) {
  .layout {
    padding: 10px;
    gap: 10px;
  }

  .map-head {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .viewport {
    min-height: 430px;
  }

  .map-foot {
    font-size: 11px;
  }

  .side-panel {
    padding: 18px;
  }
}

/* FORMULARIO MINI CRM */

.crm-form {
  width: 100%;
  margin-top: 15px;
}

.crm-form h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.crm-form p {
  color: #647067;
  margin-bottom: 20px;
  line-height: 1.5;
}

.crm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}

.crm-field label {
  font-weight: 600;
  font-size: 14px;
}

.crm-field input,
.crm-field select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d8e0d7;
  border-radius: 9px;
  background: #ffffff;
  font: inherit;
  box-sizing: border-box;
}

.crm-field input:focus,
.crm-field select:focus {
  outline: 2px solid #a3c6a8;
  border-color: #64866a;
}

.crm-submit {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: #234d35;
  color: white;
  border: none;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.crm-submit:hover {
  background: #183a27;
}

.crm-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#crm-mensaje {
  color: #b42318;
  font-size: 14px;
  margin-top: 10px;
}

.crm-success {
  text-align: center;
  padding: 25px 10px;
}

.crm-success-icon {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #e3f4e6;
  color: #247238;
  font-size: 30px;
}

.crm-small {
  margin-top: 20px;
  font-size: 13px;
}
