/* Colores y fuentes de golcomm.com */
:root {
  --azul: #0c71c3;          /* íconos y títulos */
  --azul-2: #0492ff;        /* botones del portal */
  --turquesa: #29c4a9;
  --degradado: linear-gradient(135deg, #2b87da 0%, #29c4a9 100%);
  --lima: #a0cf00;
  --fondo: #f2f5fa;
  --tarjeta: #fff;
  --texto: #333333;
  --tenue: #666666;
  --borde: #dbe3ee;
  --oscuro: #222222;
  --ok: #17a389;
  --mal: #d0402f;
  --radio: 14px;
  --titulos: "Poppins", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 16px/1.5 "Open Sans", Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--azul); }
main { width: 100%; max-width: 860px; margin: 0 auto; padding: 18px 16px 120px; flex: 1; }
h1, h2, h3, .btn, summary, .marca { font-family: var(--titulos); }

/* Barra superior: blanca con el logo, como el portal */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; color: var(--tenue); padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.barra::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--degradado); }
.marca { display: flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none; font-weight: 600; font-size: 15px; }
.marca img { height: 34px; width: auto; display: block; }
.marca .app { padding-left: 10px; border-left: 1px solid var(--borde); color: var(--azul); }
.logo-txt { font-weight: 800; font-size: 24px; letter-spacing: 1px; background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent; }
.barra nav { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.barra nav a { color: var(--azul); font-weight: 600; text-decoration: none; }
.quien { color: var(--tenue); }

h1 { font-size: 24px; margin: 0 0 4px; font-weight: 700; font-style: italic; color: var(--oscuro); }
h2 { font-size: 18px; font-weight: 600; }
.sub { color: var(--tenue); margin: 0 0 8px; font-size: 14px; }

/* Botones (redondos como los del portal) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid var(--borde); background: #fff; color: var(--azul);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .08s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn.primario { background: var(--azul-2); border-color: var(--azul-2); color: #fff; box-shadow: 0 4px 12px rgba(4,146,255,.28); }
.btn.degradado { background: var(--degradado); border: 0; color: #fff; box-shadow: 0 4px 14px rgba(41,196,169,.35); }
.btn.blanco { background: #fff; border-color: #fff; color: var(--azul); text-transform: uppercase; letter-spacing: .5px; font-size: 14px; }
.btn.peligro { background: #fff; border-color: var(--mal); color: var(--mal); }
.btn.grande { min-height: 52px; font-size: 16px; }
.btn.ancho { width: 100%; }
.enlace { background: none; border: 0; color: var(--azul-2); font: inherit; font-weight: 600; padding: 6px 0; cursor: pointer; }

.acciones-top { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.acciones-top .grande { flex: 1 1 220px; }

/* Banda de bienvenida con el degradado del portal */
.banda {
  position: relative; overflow: hidden; border-radius: 18px; padding: 22px 20px 34px;
  background: var(--degradado); color: #fff; margin-bottom: 16px;
}
.banda h1 { color: #fff; }
.banda p { margin: 0 0 16px; opacity: .92; }
.banda::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -38px; height: 70px;
  background: rgba(255,255,255,.22); border-radius: 50%;
}
.banda .acciones-top { position: relative; z-index: 1; margin: 0; }
.banda .resumen { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 16px; font-size: 14px; }
.banda .resumen b { font-family: var(--titulos); font-size: 22px; display: block; line-height: 1.1; }

/* Login */
.tarjeta { background: var(--tarjeta); border-radius: var(--radio); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.login { max-width: 380px; margin: 40px auto; }
.login form { display: grid; gap: 14px; margin-top: 10px; }

/* Formularios */
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--tenue); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--borde); border-radius: 10px; background: #fff; color: var(--texto);
  font: inherit; font-weight: 400;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--azul-2); outline-offset: 0; border-color: var(--azul-2); }
body.pagina-login { background: var(--degradado); }
.login h1 { color: var(--azul); }
.alerta { background: #fff6e8; border: 1px solid #f3c98d; padding: 12px; border-radius: 10px; font-size: 14px; }
.alerta.error { background: #fdecea; border-color: #f1a99f; }
.alerta .botones { display: flex; gap: 8px; margin-top: 10px; }
code { background: #f1f4f7; padding: 2px 4px; border-radius: 4px; font-size: 13px; word-break: break-all; }

/* Lista */
.filtros { display: flex; gap: 8px; margin-bottom: 12px; }
.filtros input { flex: 1; }
.filtros select { width: auto; }
.lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lista a { display: block; background: var(--tarjeta); padding: 14px 16px; border-radius: var(--radio); text-decoration: none; color: inherit; box-shadow: 0 2px 8px rgba(12,113,195,.07); border-left: 4px solid var(--azul-2); }
.lista a strong { font-family: var(--titulos); font-weight: 600; color: var(--oscuro); }
.fila1 { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.fila2 { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--tenue); font-size: 13px; margin-top: 4px; }
.vacio { color: var(--tenue); text-align: center; padding: 30px 0; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip.borrador { background: #fff1de; color: #9a5205; }
.chip.terminada { background: #dcf6f0; color: #0f7d69; }
.barra-prog { height: 6px; border-radius: 3px; background: #e3e8ee; overflow: hidden; margin-top: 8px; }
.barra-prog i { display: block; height: 100%; background: var(--degradado); }

/* Forma de captura */
.titulo-forma { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.progreso-total { font-family: var(--titulos); font-weight: 600; color: #fff; background: var(--degradado); padding: 4px 14px; border-radius: 999px; font-size: 14px; }
.separador { margin: 28px 0 10px; color: var(--oscuro); font-style: italic; font-weight: 700; }
.separador::before { content: ""; display: inline-block; width: 6px; height: 18px; margin-right: 8px; border-radius: 3px; background: var(--degradado); vertical-align: -2px; }
.seccion { background: var(--tarjeta); border-radius: var(--radio); margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.seccion.abierta { padding: 14px; }
.seccion > summary {
  list-style: none; cursor: pointer; padding: 15px 16px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.seccion > summary::-webkit-details-marker { display: none; }
.seccion > summary::after { content: "›"; font-size: 22px; line-height: 1; color: var(--azul-2); transition: transform .15s; }
.seccion[open] > summary { color: var(--azul); }
.seccion[open] > summary::after { transform: rotate(90deg); }
.seccion > summary .cuenta { margin-left: auto; font-size: 13px; color: var(--tenue); font-weight: 600; }
.seccion > summary .cuenta.completa { color: #fff; background: var(--turquesa); padding: 1px 9px; border-radius: 999px; }
.campos { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 16px 16px; }
@media (min-width: 640px) { .campos { grid-template-columns: 1fr 1fr; } .campos .completo { grid-column: 1 / -1; } }
.gps { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--tenue); }

.todos { padding: 0 16px; text-align: right; }
.paso {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px;
  border-top: 1px solid #edf0f3; color: var(--texto); font-weight: 400; font-size: 15px; cursor: pointer;
}
.paso input { width: 24px; height: 24px; min-height: 0; flex: 0 0 24px; margin: 0; accent-color: var(--turquesa); }
.paso input:checked + span { color: var(--tenue); text-decoration: line-through; }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 10px 0; }
.galeria img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: #e3e8ee; }
.galeria.grande { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.mini { position: relative; font-weight: 400; font-size: 13px; }
.mini span { display: flex; align-items: center; gap: 4px; }
.mini span input { width: 18px; min-height: 0; }
.mini .quitar {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.subir { cursor: pointer; }

.lienzo { width: 100%; height: 180px; border: 2px dashed #9fd9ef; border-radius: 10px; background: #fff; touch-action: none; display: block; }
.firma-guardada { max-width: 100%; height: 120px; object-fit: contain; border: 1px solid var(--borde); border-radius: 8px; background: #fff; }

.barra-guardar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 10px; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--borde);
}
.barra-guardar .btn { flex: 1; min-height: 50px; }
.estado-envio { color: var(--mal); font-weight: 600; min-height: 1em; }
.ocupado .barra-guardar { opacity: .6; pointer-events: none; }

/* Reporte */
.reporte { background: var(--tarjeta); border-radius: var(--radio); padding: 20px; }
.rep-cab { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 3px solid; border-image: var(--degradado) 1; }
.rep-logo { height: 40px; margin-bottom: 8px; }
.rep-estado { min-width: 180px; text-align: right; }
.reporte h2 { color: var(--azul); border-bottom: 1px solid var(--borde); padding-bottom: 4px; margin-top: 22px; }
.reporte h3 { font-size: 15px; margin: 14px 0 4px; }
.reporte h3 small { color: var(--tenue); font-weight: 400; }
.datos { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 6px 14px; margin: 0; }
.datos dt { color: var(--tenue); font-size: 14px; }
.datos dd { margin: 0; overflow-wrap: anywhere; }
.cotejo { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 24px; }
.cotejo li { break-inside: avoid; padding: 2px 0; font-size: 14px; }
.cotejo li span { display: inline-block; width: 18px; font-weight: 700; }
.cotejo li.si span { color: var(--ok); }
.cotejo li.no { color: var(--tenue); }
.cotejo li.no span { color: var(--mal); }
.zona-peligro { margin-top: 30px; text-align: center; }

/* Pie oscuro como el del portal */
.pie { background: var(--oscuro); color: #aaa; text-align: center; font-size: 13px; padding: 18px 16px 90px; }
.pie b { color: var(--lima); font-weight: 600; }
body.pagina-login .pie { background: transparent; color: rgba(255,255,255,.85); padding-bottom: 18px; }
body.pagina-login .pie b { color: #fff; }

@media print {
  .pie { display: none; }
  .reporte h1 { color: #000; }
  body { background: #fff; font-size: 12px; }
  .barra, .no-imprimir { display: none !important; }
  main { padding: 0; max-width: none; }
  .reporte { padding: 0; }
  .reporte section { break-inside: avoid-page; }
  .galeria.grande { grid-template-columns: repeat(3, 1fr); }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 420px) { .quien { display: none; } .marca .app { font-size: 13px; } .marca img { height: 28px; } }

/* ===== Ciclo prospecto → instalación ===== */
.pagina-publica .banda h1 { font-size: 26px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mini-titulo { margin: 0 0 8px; font-size: 16px; color: var(--azul); }
.campos.sin-borde { padding: 0; }
.seccion.abierta > .gps, .seccion.abierta > label { margin-top: 10px; }
.centro { text-align: center; }
.gracias { max-width: 460px; margin: 30px auto; text-align: center; display: grid; gap: 10px; }
.ok-grande { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--degradado); color: #fff; display: grid; place-items: center; font-size: 34px; font-weight: 700; }
.alerta.info { background: #e8f6fd; border-color: #a9daf5; }
.alerta div + div { margin-top: 4px; }

.banda .resumen a { color: #fff; text-decoration: none; }

/* Chips por etapa y dictamen */
.chip.etapa-prospecto { background: #e8f2ff; color: #0c5aa0; }
.chip.etapa-cotizado { background: #f1ebff; color: #5b3cc4; }
.chip.etapa-aceptado { background: #fff1de; color: #9a5205; }
.chip.etapa-instalacion { background: #fff1de; color: #9a5205; }
.chip.etapa-terminada { background: #dcf6f0; color: #0f7d69; }
.chip.etapa-descartado { background: #eceff3; color: #5d6670; }
.chip.dict-viable { background: #dcf6f0; color: #0f7d69; }
.chip.dict-revisar { background: #fff3d6; color: #8a5a00; }
.chip.dict-no { background: #fde6e3; color: #a52d1f; }
.dict-txt.dict-viable { color: #0f7d69; } .dict-txt.dict-revisar { color: #a36a00; } .dict-txt.dict-no { color: #b73425; }
.lista li.et-prospecto a { border-left-color: #2b87da; }
.lista li.et-cotizado a { border-left-color: #7b5cf0; }
.lista li.et-aceptado a, .lista li.et-instalacion a { border-left-color: #f0a024; }
.lista li.et-terminada a { border-left-color: var(--turquesa); }
.lista li.et-descartado a { border-left-color: #b8c0c8; opacity: .8; }

/* Línea de etapas */
.etapas { list-style: none; display: flex; gap: 4px; padding: 0; margin: 14px 0 4px; counter-reset: e; }
.etapas li { flex: 1; text-align: center; font-size: 11px; color: var(--tenue); position: relative; padding-top: 30px; line-height: 1.2; }
.etapas li span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #e3e8ee; color: var(--tenue); display: grid; place-items: center; font-weight: 700; font-size: 12px; z-index: 1; }
.etapas li::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: #e3e8ee; }
.etapas li:first-child::before { display: none; }
.etapas li.hecha span { background: var(--turquesa); color: #fff; }
.etapas li.hecha::before, .etapas li.actual::before { background: var(--turquesa); }
.etapas li.actual span { background: var(--azul-2); color: #fff; box-shadow: 0 0 0 4px rgba(4,146,255,.18); }
.etapas li.actual { color: var(--azul); font-weight: 700; }

.siguiente { background: #f4f9ff; border: 1px solid #d3e8fb; border-radius: 14px; padding: 14px 16px; margin-top: 16px; }
.siguiente h2 { margin: 0 0 10px; font-size: 17px; color: var(--azul); border: 0; padding: 0; }
.en-linea { display: inline; margin: 0; }
.fila-form { display: flex; gap: 8px; margin-top: 10px; }
.fila-form input { flex: 1; }
.aceptar { margin: 12px 0; display: grid; gap: 10px; }
.aceptar h3 { margin: 0; font-size: 16px; }
.sync { list-style: none; padding: 0; margin: 10px 0; }
.sync li { padding: 3px 0; }
.sync li::before { display: inline-block; width: 20px; font-weight: 700; }
.sync li.si::before { content: "✓"; color: var(--ok); }
.sync li.no::before { content: "•"; color: var(--tenue); }

/* Factibilidad */
.torre-card { border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.torre-card.mejor { border-color: #9fd9ef; box-shadow: 0 2px 10px rgba(12,113,195,.08); }
.torre-card .fila1 strong { font-family: var(--titulos); }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.cifras div { background: var(--fondo); border-radius: 10px; padding: 8px 10px; }
.cifras b { display: block; font-family: var(--titulos); font-size: 16px; color: var(--oscuro); white-space: nowrap; }
.cifras small { color: var(--tenue); font-size: 12px; }
svg.perfil { width: 100%; height: auto; display: block; margin-top: 6px; }
svg.perfil .rej { stroke: #e6ebf1; stroke-width: 1; }
svg.perfil .eje { font: 13px "Open Sans", Arial, sans-serif; fill: #6b7884; }
svg.perfil .terreno { fill: #cfe9d9; stroke: #6fb98f; stroke-width: 1.5; }
svg.perfil .fresnel { fill: none; stroke: #f0a024; stroke-width: 1.5; stroke-dasharray: 5 4; }
svg.perfil .vista { stroke-width: 2.5; }
svg.perfil .mastil { stroke: #444; stroke-width: 2; }
.leyenda i { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin: 0 4px 0 10px; }
.leyenda i:first-child { margin-left: 0; }
.l-vista { border-top: 3px solid #17a389; } .l-fresnel { border-top: 2px dashed #f0a024; } .l-terreno { border-top: 8px solid #cfe9d9; }
.resultado-prueba { margin: 12px 0 4px; }

/* Historial */
.historial { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.historial li { display: grid; grid-template-columns: 76px 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid #eef1f5; }
.historial time { color: var(--tenue); font-size: 13px; }
.historial small { grid-column: 2; color: var(--tenue); font-size: 12px; }
.historial .ev-error span { color: var(--mal); }
.historial .ev-uisp span::before { content: "UISP · "; color: var(--azul-2); font-weight: 600; }

/* Cotización */
.planes { display: grid; gap: 8px; }
.plan { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1.5px solid var(--borde); border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--texto); font-weight: 400; }
.plan input { width: 20px; height: 20px; min-height: 0; accent-color: var(--azul-2); }
.plan b { font-family: var(--titulos); display: block; }
.plan small { color: var(--tenue); }
.plan em { font-style: normal; font-family: var(--titulos); font-weight: 700; color: var(--azul); }
.plan:has(input:checked) { border-color: var(--azul-2); background: #f2f9ff; }
.extra { display: grid; grid-template-columns: 1fr 64px 96px; gap: 8px; align-items: center; border-top: 1px solid #edf0f3; padding: 6px 0; }
.extra .paso { border: 0; padding: 6px 0; }
.extra.libre { grid-template-columns: 1fr 96px; }
.extra input[type=number] { padding: 8px; text-align: right; }
.total-cot { background: var(--degradado); color: #fff; border-radius: 14px; padding: 14px 16px; margin: 16px 0; font-family: var(--titulos); font-size: 16px; }
.total-cot b { font-size: 24px; display: block; }
.total-cot small { font-family: "Open Sans", Arial, sans-serif; opacity: .85; font-size: 12px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0; }
.tabla th, .tabla td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla th { color: var(--tenue); font-weight: 600; font-size: 13px; }
.tabla .num { text-align: right; white-space: nowrap; }
.tabla tfoot th { color: var(--oscuro); font-size: 15px; border-bottom: 0; }
.tabla-scroll { overflow-x: auto; background: #fff; border-radius: 12px; }
.tabla.torres td small { display: block; color: var(--tenue); font-size: 12px; }
.tabla.torres input { min-height: 38px; padding: 6px 8px; }
.tabla.torres input[type=number] { width: 84px; text-align: right; }
.tabla.torres input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--turquesa); }

.leer-radio { display: grid; gap: 6px; }
.radio-info { background: #f2f9ff; border: 1px solid #cfe6fb; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--texto); }

@media print { .siguiente, .fila-form { display: none !important; } }
.extra .paso input:checked + span { text-decoration: none; color: var(--texto); font-weight: 600; }
.rep-estado .chip { display: inline-block; margin: 2px 0 2px 4px; }
