/*
Define colores, tamaños, espacios y la forma de mostrar la página en el celular.
Se usa: Cada vez que se abre la página.
Trabaja con: index.php; cambia la apariencia, sin guardar datos en la base.
*/
:root {
    color-scheme: light;
    --green: #155a43;
    --ink: #203d32;
    --muted: #596d62;
    --border: #d6e2d9;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f3f6f1; color: var(--ink); font: 16px/1.55 system-ui, sans-serif; }
header { padding: 42px max(24px, calc((100vw - 1080px) / 2)); background: var(--green); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 750; }
h1 { margin: 24px 0 12px; font-size: clamp(28px, 4vw, 42px); line-height: 1.18; letter-spacing: -.8px; }
header p { max-width: 650px; color: #e0eee3; }
.badge { display: inline-block; padding: 5px 12px; border: 1px solid #83ab94; border-radius: 20px; font-size: 13px; }
main { max-width: 1128px; margin: auto; padding: 24px; }
section { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin: 0 0 20px; }
section section { background: #fbfcfa; }
h2, h3 { margin: 0 0 14px; line-height: 1.3; }
h4 { margin: 0 0 8px; }
p { margin: 8px 0 16px; }
form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
form > label:not(.check) { flex: 1 1 220px; }
label { display: block; font-size: 14px; font-weight: 600; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; padding: 11px 12px; margin-top: 6px; border: 1px solid #afc4b7; background: #fff; border-radius: 8px; font: inherit; color: var(--ink); }
input[type=checkbox] { accent-color: var(--green); width: 17px; height: 17px; }
button { padding: 11px 17px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff; font: 600 14px/1.4 system-ui, sans-serif; cursor: pointer; }
button:hover { filter: brightness(.93); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { background: #fff; color: var(--green); }
:focus-visible { outline: 3px solid #d7a437; outline-offset: 3px; }
fieldset { width: 100%; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
legend { font-size: 14px; font-weight: 650; padding: 0 6px; }
.materiales, #cobertura { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.check, .materiales label, #cobertura label { display: inline-flex; align-items: center; gap: 7px; }
.hint, small { color: var(--muted); font-size: 14px; font-weight: 400; }
form > p, form > .check { flex-basis: 100%; }
summary { cursor: pointer; color: var(--green); font-weight: 650; padding: 18px 0 8px; }
details form { margin-top: 14px; }
#mensaje { padding: 14px 18px; background: #fff2cb; border: 1px solid #e5d5a3; border-radius: 8px; overflow-wrap: anywhere; }
#mapa { height: 360px; margin-top: 16px; background: #edf2ec; border-radius: 10px; border: 1px solid var(--border); }
.section-heading, .search { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.search { align-items: end; }
.search label { flex: 1; }
#resultados { display: grid; gap: 8px; }
#resultados button { text-align: left; background: #edf5ef; color: var(--green); }
article { padding: 18px; margin: 14px 0; border: 1px solid var(--border); border-left: 4px solid #66a37e; border-radius: 8px; }
article form { margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
a { color: var(--green); text-underline-offset: 3px; }
.metrics { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.metric { flex: 1 1 150px; background: #edf5ef; border-radius: 10px; padding: 16px; }
.metric strong { display: block; font-size: 26px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f0f5ef; }
.empty { padding: 20px; background: #f3f7f1; border-radius: 8px; color: var(--muted); }
footer { padding: 25px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 600px) {
    header { padding: 28px 20px; }
    main { padding: 16px; }
    section { padding: 18px; }
    .section-heading, .search { align-items: stretch; flex-direction: column; }
    form > button { width: 100%; }
    #mapa { height: 300px; }
}
