html,
body {
    min-height: 100%;
    background-color: #f4f7fb;
    background-image: url("/imagenes/fondoSegCasos.jpg");
    background-repeat: repeat;
    background-size: 420px auto;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #343434;
}

main {
    position: relative;
    padding: 12px;
    max-width: 720px;
    margin: 0 auto;
}

.page {
    display: none;
    width: 100%;
    padding: 10px;
}

.active {
    display: block;
}

.logoPrincipal {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.logoPrincipal img {
    width: 100%;
    max-width: 720px;
    height: auto;
}

.tituloApp {
    text-align: center;
    font-size: 1.6rem;
    margin: 0.4rem 0 0.2rem;
    color: #0d47a1;
}

.bloqueOpcion {
    position: relative;
    top: 16px;
    color: #343434;
}

.botonCentrado {
    text-align: center;
    margin-bottom: 15px;
}

.textoLogin {
    display: block;
    margin-bottom: 8px;
}

.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85em;
    cursor: pointer;
    width: 70%;
    margin: auto;
    margin-bottom: 15px;
    height: auto;
    line-height: 1.3;
    padding: 0.6rem 1rem;
    border-radius: 4px;
}

.fondoAzul {
    background-color: #024bd5;
}

.fondoAzul:hover {
    background-color: green;
}

.fondoVerde {
    background-color: #2e7d32;
}

.fondoVerde:hover {
    background-color: #1b5e20;
}

.fondoRojo {
    background-color: #c62828;
}

.fondoNaranja {
    background-color: #ff5719;
}

.fondoNegro {
    background-color: #000000;
}

.opcionHead {
    width: 100%;
    display: flex;
    margin-top: 10px;
}

.opcionTitulo {
    font-size: 1.4em;
    font-weight: 600;
    color: white;
    padding: 10px 14px;
}

.login-telefono-sms {
    margin-top: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.9rem 1rem;
    border-radius: 6px;
}

.login-telefono-sms label {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
}

.login-telefono-sms input[type="tel"],
.login-telefono-sms input[type="text"] {
    width: 100%;
    max-width: 16rem;
    margin-bottom: 0.35rem;
}

body.auth-pendiente main {
    visibility: hidden;
}

.recaptcha-login {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.credito {
    position: relative;
    top: 28px;
    color: black;
    font-size: 0.6em;
    text-align: center;
}

.panelSesion,
.admin-usuarios-panel {
    margin-top: 0.75rem;
    color: #222;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem;
    border-radius: 6px;
}

.admin-usuarios-titulo {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.admin-usuarios-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.admin-usuarios-filtros input[type="search"] {
    min-width: 12rem;
    flex: 1 1 12rem;
}

.admin-usuarios-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: #fff;
}

.admin-usuarios-tabla th,
.admin-usuarios-tabla td {
    border: 1px solid #ccc;
    padding: 0.35rem 0.45rem;
    vertical-align: top;
}

.admin-usuarios-tabla th {
    background: #e8e8e8;
    text-align: left;
}

.fila-usuario-inactivo td {
    background: #fdecea;
    color: #555;
}

.btn-sm-admin {
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
    margin: 0.1rem 0;
    width: auto;
}

.admin-usuarios-form {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.admin-usuarios-phone-msg.msg-ok {
    color: #1b5e20;
}

.admin-usuarios-phone-msg.msg-error {
    color: #b71c1c;
}

.admin-usuarios-phone-msg.msg-info {
    color: #0d47a1;
}

body.en-actividades main {
    max-width: 1100px;
}

.form-actividad .form-group {
    margin-bottom: 0.9rem;
}

.form-actividad label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-actividad input[type="text"],
.form-actividad input[type="number"],
.form-actividad input[type="date"],
.form-actividad input[type="time"],
.form-actividad input[type="tel"],
.form-actividad select,
.form-actividad textarea {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.35rem;
}

.linea-estrategica-opcion {
    display: block;
    font-weight: 500;
    margin: 0.15rem 0;
}

.ayuda-bloque-anexos,
.aviso-historico-actividad,
.estado-preview-act {
    font-weight: 400;
    font-size: 0.85rem;
    color: #333;
}

.btn-ancho-auto {
    width: auto;
    margin: 0.35rem 0.35rem 0.35rem 0;
}

.btn-mini {
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
}

.matriz-part-subtitulo {
    margin: 0.6rem 0 0.3rem;
    font-size: 1rem;
}

.matriz-part-scroll {
    overflow-x: auto;
    max-width: 100%;
    margin-bottom: 0.6rem;
}

.matriz-participantes,
.tabla-ayudas-entregadas,
.tabla-compromisos {
    border-collapse: collapse;
    background: #fff;
    font-size: 0.78rem;
    min-width: 640px;
}

.tabla-ayudas-entregadas,
.tabla-compromisos {
    min-width: 100%;
    width: 100%;
}

.matriz-participantes th,
.matriz-participantes td,
.tabla-ayudas-entregadas th,
.tabla-ayudas-entregadas td,
.tabla-compromisos th,
.tabla-compromisos td {
    border: 1px solid #ccc;
    padding: 0.2rem;
    text-align: center;
}

.matriz-participantes th,
.tabla-ayudas-entregadas th,
.tabla-compromisos th {
    background: #e3f2fd;
}

.matriz-part-celda,
.poblacion-impactada-celda,
.ayuda-entregada-cant {
    width: 4.2rem;
    margin: 0;
    padding: 0.15rem;
}

.tabla-compromisos-scroll {
    overflow-x: auto;
}

.galeria-fotos-act {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 1rem;
}

.item-foto-actividad {
    position: relative;
    display: inline-block;
}

.vista-previa-foto-act {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 1px solid #ccc;
    background: #fff;
}

.btn-borrar-foto-act {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1;
    border: none;
    border-radius: 50%;
    background: #c62828;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.tarjeta-actividad {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.6rem;
}

.tarjeta-actividad h4 {
    margin: 0 0 0.2rem;
}

.tarjeta-actividad p {
    margin: 0.1rem 0;
}

.agregar-ayuda-extra {
    margin-top: 0.6rem;
}

button.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.aviso-gps-actividad {
    background: #fff8e1;
    border: 1px solid #f0d48a;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin: 0 0 0.8rem;
    font-size: 0.9rem;
}

.panel-rango-informe {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
}

.panel-rango-informe label {
    display: block;
    font-weight: 600;
    margin-top: 0.4rem;
}

.kpis-reporte {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 1rem;
}

.kpi-reporte {
    background: #e3f2fd;
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    min-width: 8rem;
}

.kpi-reporte span {
    display: block;
    font-size: 0.78rem;
}

.kpi-reporte strong {
    font-size: 1.25rem;
}

.reporte-actividades h3 {
    margin: 1.1rem 0 0.35rem;
}

.tabla-reporte {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.8rem;
    background: #fff;
}

.tabla-reporte th,
.tabla-reporte td {
    border: 1px solid #cfd6e0;
    padding: 0.3rem 0.45rem;
    text-align: left;
}

.tabla-reporte th {
    background: #e8eef6;
}

.nota-reporte {
    font-size: 0.85rem;
    color: #333;
}

@media print {
    body.imprimir-reporte {
        background: #fff;
    }
    body.imprimir-reporte .page {
        display: none !important;
    }
    body.imprimir-reporte #reporteActividades {
        display: block !important;
    }
    body.imprimir-reporte .no-imprimir,
    #avisoNuevaVersion,
    #avisoInstalarApp {
        display: none !important;
    }
}

body.con-aviso-pwa {
    padding-bottom: 6.5rem;
}

.aviso-nueva-version {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050;
    display: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    background: #1b5e20;
    color: #fff;
    text-align: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
}

.aviso-nueva-version.aviso-visible {
    display: flex;
}

.aviso-nueva-version span {
    max-width: 38rem;
}

.aviso-nueva-version .button {
    margin: 0;
    width: auto;
    min-width: 7rem;
}

.aviso-instalar-app {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10040;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    background: #0d47a1;
    color: #fff;
    text-align: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
}

.aviso-instalar-app .button {
    margin: 0;
    width: auto;
    min-width: 7rem;
}

.aviso-instalar-app #textoInstalarApp {
    max-width: 28rem;
}
