*{box-sizing:border-box}body{font-family:system-ui,-apple-system,Segoe UI,sans-serif;background:#f3f5f8;color:#23334a;min-height:100vh;display:grid;place-items:center;margin:0;padding:20px}.card{width:min(100%,410px);background:white;padding:32px;border-radius:18px;box-shadow:0 12px 40px #172d4512}h1{text-align:center;margin-top:0}h2{font-size:1.2rem}p{color:#607086}label{display:block;font-weight:600;margin:16px 0}input{width:100%;padding:12px;margin-top:7px;border:1px solid #cbd5e1;border-radius:9px;font:inherit}button{width:100%;padding:13px;background:#245f9b;color:white;border:0;border-radius:9px;font:inherit;font-weight:600;cursor:pointer}.error{color:#a12727;background:#fff1f1;padding:10px;border-radius:8px}


/* LA CASA: RESPONSIVE MOVIL V1 */

/* Evitar desbordamientos generales */
html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-width: 0;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Formularios adaptables */
input, select, textarea, button {
    max-width: 100%;
    min-width: 0;
    font-size: 16px;
}

textarea {
    width: 100%;
}

fieldset {
    min-width: 0;
    max-width: 100%;
}

.card, main, section, article {
    min-width: 0;
}

/* Tablas extensas */
table {
    border-collapse: collapse;
}

/* Ajustes específicos para teléfonos */
@media (max-width: 600px) {
    body {
        display: block;
        padding: 12px;
        width: 100%;
        overflow-x: hidden;
    }

    main.card,
    .card {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 18px;
        border-radius: 14px;
    }

    h1 {
        font-size: 1.65rem;
        overflow-wrap: anywhere;
    }

    h2 {
        font-size: 1.2rem;
    }

    p, label, a {
        overflow-wrap: anywhere;
    }

    input, select, textarea {
        max-width: 100%;
    }

    .report-grid {
        grid-template-columns: repeat(
            auto-fit, minmax(min(100%, 145px), 1fr)
        );
    }

    .report-filter {
        max-width: 100%;
    }

    .report-months {
        width: 100%;
        min-width: 0;
    }

    .report-scroll {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* LA CASA: RESPONSIVE MOVIL V2 */

html {
    width: 100%;
    max-width: 100%;
}

body {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

body > main {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

body > main.card {
    width: min(100%, 960px);
}

body > main.hv {
    width: min(100%, 1050px);
}

main, section, article, form, fieldset {
    min-width: 0;
}

input, select, textarea {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    body > main.card,
    body > main.hv {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 auto;
        padding: 16px;
    }

    .report-grid {
        grid-template-columns:
            repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    }
}
