/* ACAM · panel de socios */
:root {
  --verde: #1f4d3a; --verde-oscuro: #143428; --verde-claro: #e3ece6;
  --sol: #d9822b; --sol-oscuro: #b8661a;
  --fondo: #f4f1ea; --blanco: #fff; --texto: #1d2521; --suave: #5b665f; --linea: #e2dbcc;
  --rojo: #b3341f; --wa: #1fae55;
  --radio: 14px; --sombra: 0 1px 2px rgba(20,52,40,.06), 0 6px 18px rgba(20,52,40,.07);
}
* , *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Manrope", system-ui, sans-serif; color: var(--texto); background: var(--fondo); line-height: 1.55; font-size: 16px; }
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.25rem; }
a { color: var(--verde); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 2px; }
.suave { color: var(--suave); }
.chico { font-size: .86rem; }
.angosto { max-width: 560px; }
.volver { text-decoration: none; font-weight: 600; font-size: .9rem; display: inline-block; margin-bottom: 6px; }

/* Barra superior */
.barra { background: var(--verde-oscuro); color: #fff; position: sticky; top: 0; z-index: 1000; }
.barra-fila { max-width: 1240px; margin: 0 auto; padding: 0 16px; min-height: 60px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.barra-marca { color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.barra-marca strong { font-family: "Fraunces", serif; font-size: 1.4rem; letter-spacing: .04em; }
.barra-marca span { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .08em; }
.barra-menu { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.barra-menu a { color: rgba(255,255,255,.82); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .93rem; }
.barra-menu a:hover, .barra-menu a.activo { background: rgba(255,255,255,.12); color: #fff; }
.barra-usuario { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.barra-usuario form { margin: 0; }
.barra-usuario .enlace { color: #f4c690; }
@media (max-width: 760px) {
  .barra-fila { padding: 8px 16px; gap: 6px 16px; }
  .barra-menu { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .barra-menu a { white-space: nowrap; }
  .barra-usuario { margin-left: auto; }
}

.panel-contenido { max-width: 1240px; margin: 0 auto; padding: 28px 16px 80px; }
.titulo-fila { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.titulo-fila p { margin: 0; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.3em; border: 0; border-radius: 999px; background: var(--sol); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.boton:hover { background: var(--sol-oscuro); color: #fff; }
.boton-chico { padding: .45em .95em; font-size: .88rem; }
.boton-claro { background: var(--verde-claro); color: var(--verde); }
.boton-claro:hover { background: var(--verde); }
.boton-wa { background: var(--wa); }
.boton-peligro { background: var(--rojo); }
.boton-peligro:hover { background: #8e2615; }
.boton-ancho { width: 100%; }
.enlace { background: none; border: 0; padding: 0; color: var(--verde); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.enlace-peligro { color: var(--rojo); }

/* Avisos */
.aviso { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; }
.aviso-ok { background: #e2f3e8; color: #17603a; }
.aviso-error { background: #fbe7e2; color: #9b2c1a; }
.aviso-info { background: #e8eef7; color: #24426e; }
.aviso-clave { background: #fff4e0; color: #6b3d06; border: 2px dashed var(--sol); font-family: ui-monospace, Menlo, monospace; font-size: 1rem; }

/* Formularios */
.formulario { display: grid; gap: 14px; }
.formulario label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.formulario label .suave { font-weight: 500; }
.formulario input:not([type=checkbox]):not([type=file]), .formulario select, .formulario textarea, .fila-form input, .fila-form select {
  border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; background: #fff; min-width: 0; width: 100%;
}
.formulario input:focus, .formulario select:focus, .formulario textarea:focus { border-color: var(--verde); outline: none; box-shadow: 0 0 0 3px var(--verde-claro); }
.formulario label.check, label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--verde); }
.grilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .grilla-2 { grid-template-columns: 1fr; } }
.tarjeta-blanca, .bloque { background: #fff; border-radius: var(--radio); padding: 22px; box-shadow: var(--sombra); }
.bloque { margin-bottom: 18px; display: grid; gap: 14px; }
.bloque h2 { margin: 0; }
.bloque p { margin: 0; }
.bloque-admin { border: 2px solid var(--verde-claro); }
.bloque-peligro { border: 1px solid #f0c7bd; margin-top: 32px; }
.casillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.mapa-editor { height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid var(--linea); z-index: 1; }
.fila-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
.fila-form input { max-width: 360px; }
.barra-guardar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--fondo) 30%); padding: 18px 0 14px; z-index: 5; }
.barra-guardar .boton { padding: .85em 2.2em; box-shadow: 0 6px 18px rgba(217,130,43,.35); }

.subir { display: inline-flex; flex-direction: row !important; align-items: center; gap: 10px; border: 2px dashed var(--linea); border-radius: 12px; padding: 18px; cursor: pointer; background: var(--fondo); justify-content: center; }
.subir:hover { border-color: var(--verde); }
.subir input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.subir span { font-weight: 700; color: var(--verde); }
.previas { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.previas img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* Fotos cargadas */
.fotos-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.foto-item { margin: 0; background: var(--fondo); border-radius: 12px; overflow: hidden; position: relative; }
.foto-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.foto-principal { outline: 3px solid var(--sol); }
.foto-marca { position: absolute; top: 8px; left: 8px; }
.foto-item figcaption { display: flex; gap: 12px; flex-wrap: wrap; padding: 10px 12px; font-size: .86rem; }
.foto-item form { margin: 0; }

/* Tablas */
.tabla-caja { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; min-width: 760px; }
.tabla th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); padding: 12px 14px; border-bottom: 1px solid var(--linea); }
.tabla td { padding: 12px 14px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.col-miniatura { width: 72px; }
.col-miniatura img, .mini-vacia { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; }
.mini-vacia { display: grid; place-items: center; background: var(--verde-claro); color: var(--verde); font-weight: 700; font-family: "Fraunces", serif; }
.col-acciones { white-space: nowrap; }
.col-acciones > * { display: inline-flex; vertical-align: middle; margin: 2px 4px 2px 0; }
.col-acciones form { margin: 0; }
.fila-apagada { opacity: .55; }
.progreso { width: 120px; height: 8px; background: var(--fondo); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.progreso span { display: block; height: 100%; background: var(--verde); border-radius: 99px; }
.pastilla { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #fff4e0; color: #8a5208; }
.pastilla-ok { background: #e2f3e8; color: #17603a; }
.pastilla-gris { background: #eceae4; color: #6b6b66; }
.pastilla-alerta { background: #fbe7e2; color: #9b2c1a; }

/* Consultas */
.consultas-lista { display: grid; gap: 14px; }
.consulta-item { background: #fff; border-radius: var(--radio); padding: 18px 20px; box-shadow: var(--sombra); }
.consulta-item header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.consulta-datos { color: var(--suave); margin: 6px 0; }
.consulta-datos:empty { display: none; }
.consulta-mensaje { margin: 8px 0 14px; }
.consulta-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.paginas { display: flex; justify-content: space-between; margin-top: 18px; font-weight: 600; }

/* Ingreso */
.panel-ingreso { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 10%, #2b6a50 0, var(--verde-oscuro) 60%); }
.tarjeta-ingreso { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 32px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.ingreso-sigla { font-family: "Fraunces", serif; font-size: 2rem; color: var(--verde); margin: 0; letter-spacing: .04em; }
.tarjeta-ingreso h1 { font-size: 1.4rem; }
.tarjeta-ingreso code { background: var(--fondo); padding: 2px 6px; border-radius: 6px; }
