﻿:root {
    --oroplag-verde: #123A2C;
    --oroplag-dorado: #D4A017;
    --oroplag-fondo: #F7F7F5;
    --oroplag-texto: #2B2B2B;
    --oroplag-exito: #4CAF50;
}

/* Reglas para Sticky Footer */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--oroplag-fondo);
    color: var(--oroplag-texto);
    font-family: Arial, sans-serif;
}

main {
    flex: 1 0 auto;
}

/* Componentes de la interfaz */
.navbar-oroplag {
    background: #fff;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 10px;
}

.navbar-toggler {
    border-color: var(--oroplag-verde);
    padding: 4px 8px;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(18, 58, 44, 0.25);
    }

.logo-header {
    height: 74px;
    width: auto;
    border-radius: 6px;
    display: block;
}

.logo-footer {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.footer-social-link {
    color: var(--oroplag-dorado);
    font-size: 20px;
    transition: opacity 0.15s;
}

    .footer-social-link:hover {
        opacity: 0.75;
    }

.btn-oroplag-primary {
    background: var(--oroplag-dorado);
    color: var(--oroplag-verde);
    font-weight: bold;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
}

    .btn-oroplag-primary:hover {
        opacity: 0.9;
        color: var(--oroplag-verde);
    }

.banner-contexto {
    background: #EAF3DE;
    border: 1px solid #C0DD97;
    border-radius: 10px;
    padding: 14px 18px;
    color: #27500A;
    font-size: 13px;
    margin-bottom: 24px;
}

.card-formulario {
    background: #fff;
    border: 1px solid #E3E3E0;
    border-radius: 12px;
    padding: 28px;
    max-width: 480px;
    margin: 0 auto;
}

.footer-oroplag {
    flex-shrink: 0;
    background: var(--oroplag-verde);
    color: var(--oroplag-fondo);
    text-align: center;
    padding: 20px;
    font-size: 12px;
    margin-bottom: 60px;
}

.hero-oroplag {
    background: var(--oroplag-verde);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

    .hero-oroplag .eyebrow {
        color: var(--oroplag-dorado);
        font-size: 13px;
        letter-spacing: 1px;
        font-weight: bold;
    }


@media (max-width: 576px) {
    .hero-oroplag {
        padding: 48px 16px;
    }

        .hero-oroplag h1 {
            font-size: 1.6rem;
        }

    .card-formulario {
        padding: 20px;
    }

    .navbar-oroplag {
        padding: 12px 16px;
    }
}

/* Re-teñido de los colores "de fábrica" de Bootstrap a la marca Oroplag.
   Así cualquier clase estándar de Bootstrap (la use quien la use) sale en
   los colores correctos, sin tener que acordarse de usar clases personalizadas. */
:root {
    --bs-warning-rgb: 212, 160, 23; /* dorado D4A017, para bg-warning / text-warning / border-warning */
    --bs-success-rgb: 18, 58, 44; /* verde 123A2C, para bg-success / text-success / border-success */
}

.btn-warning {
    --bs-btn-color: var(--oroplag-verde);
    --bs-btn-bg: var(--oroplag-dorado);
    --bs-btn-border-color: var(--oroplag-dorado);
    --bs-btn-hover-color: var(--oroplag-verde);
    --bs-btn-hover-bg: #c4930f;
    --bs-btn-hover-border-color: #c4930f;
    --bs-btn-active-color: var(--oroplag-verde);
    --bs-btn-active-bg: #b38a0e;
    --bs-btn-active-border-color: #b38a0e;
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--oroplag-verde);
    --bs-btn-border-color: var(--oroplag-verde);
    --bs-btn-hover-bg: #0d2b20;
    --bs-btn-hover-border-color: #0d2b20;
    --bs-btn-active-bg: #0a2118;
    --bs-btn-active-border-color: #0a2118;
}

.badge.bg-light {
    background-color: var(--oroplag-dorado) !important;
    color: var(--oroplag-verde) !important;
}


/* ================= Módulo 2 — Panel del técnico (Sprint 3) =================
   Agregar al FINAL de wwwroot/css/site.css. Mobile-first: todo está pensado
   para un celular en una mano; en pantallas grandes solo se centra a 560px. */

.tecnico-body {
    background: var(--oroplag-fondo);
}

.tecnico-header {
    background: var(--oroplag-verde);
    padding: 10px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tecnico-logo {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.tecnico-salir {
    color: var(--oroplag-fondo);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 4px;
}

    .tecnico-salir:hover, .tecnico-salir:focus {
        color: var(--oroplag-dorado);
    }

.tecnico-main {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px 110px; /* espacio para el botón fijo */
}

.tecnico-saludo h1 {
    color: var(--oroplag-verde);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.tecnico-saludo p {
    color: #6B6B66;
    font-size: 14px;
    margin-bottom: 20px;
}

.tecnico-vacio {
    text-align: center;
    color: #6B6B66;
    padding: 48px 16px;
}

    .tecnico-vacio i {
        font-size: 44px;
        color: var(--oroplag-verde);
        display: block;
        margin-bottom: 12px;
    }

.tecnico-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #E3E3E0;
    border-radius: 12px;
    overflow: hidden;
}

.tecnico-fila {
    padding: 14px 16px;
    border-bottom: 1px solid #EFEFEC;
}

    .tecnico-fila:last-child {
        border-bottom: none;
    }

.tecnico-fila-principal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.tecnico-cliente {
    font-weight: bold;
    color: var(--oroplag-texto);
}

.tecnico-fila-detalle {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 13px;
    color: #6B6B66;
    margin-top: 4px;
}

/* Nivel de infestación: es el dato que Héctor revisa primero, por eso lleva color */
.tecnico-nivel {
    font-size: 12px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.nivel-nulo {
    background: #EFEFEC;
    color: #55554F;
}

.nivel-baja {
    background: #E3EFE7;
    color: var(--oroplag-verde);
}

.nivel-media {
    background: #FBF0CF;
    color: #7A5A00;
}

.nivel-alta {
    background: #F8DEDA;
    color: #9A2B1C;
}

.tecnico-accion-fija {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--oroplag-fondo) 70%, rgba(247, 247, 245, 0));
}

    .tecnico-accion-fija .tecnico-btn-grande {
        max-width: 528px;
        margin: 0 auto;
        display: block;
    }

.tecnico-btn-grande {
    font-size: 17px;
    font-weight: bold;
    padding: 14px 20px;
    border-radius: 10px;
}

.btn-warning:focus-visible, .tecnico-salir:focus-visible {
    outline: 3px solid var(--oroplag-dorado);
    outline-offset: 2px;
}

/* ================= Módulo 2 — Formulario "Nuevo reporte" (Sprint 3) =================
   Agregar al FINAL de wwwroot/css/site.css, después del bloque del panel del técnico. */

.reporte-volver {
    display: inline-block;
    color: var(--oroplag-verde);
    text-decoration: none;
    font-size: 15px;
    padding: 4px 0 8px;
}

.reporte-titulo {
    color: var(--oroplag-verde);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 16px;
}

.reporte-seccion {
    background: #fff;
    border: 1px solid #E3E3E0;
    border-radius: 12px;
    padding: 18px 16px 6px;
    margin-bottom: 16px;
}

    .reporte-seccion h2 {
        font-size: 1.1rem;
        font-weight: bold;
        color: var(--oroplag-verde);
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 16px;
    }

.reporte-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--oroplag-verde);
    color: #fff;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reporte-campo {
    margin-bottom: 18px;
    border: 0;
    padding: 0;
    min-width: 0;
}

.reporte-label {
    display: block;
    font-weight: bold;
    font-size: 15px;
    color: var(--oroplag-texto);
    margin-bottom: 8px;
    padding: 0;
}

    .reporte-label small {
        font-weight: normal;
        color: #6B6B66;
        margin-left: 4px;
    }

.reporte-fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reporte-seccion .form-control {
    font-size: 16px; /* 16px evita que iPhone haga zoom al tocar el campo */
    min-height: 46px;
}

/* ---------- Opciones tipo "chip" (casillas y círculos) ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    position: relative;
    cursor: pointer;
}

    .chip input {
        position: absolute;
        opacity: 0;
        width: 1px;
        height: 1px;
    }

    .chip span {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 16px;
        border: 1.5px solid #CFCFCA;
        border-radius: 999px;
        background: #fff;
        font-size: 15px;
        user-select: none;
    }

    .chip input:checked + span {
        background: var(--oroplag-verde);
        border-color: var(--oroplag-verde);
        color: #fff;
    }

        .chip input:checked + span::before {
            content: "✓";
            margin-right: 6px;
            font-weight: bold;
        }

    .chip input:focus-visible + span {
        outline: 3px solid var(--oroplag-dorado);
        outline-offset: 2px;
    }

/* ---------- Nivel de infestación ---------- */
.niveles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.nivel-opcion {
    position: relative;
    cursor: pointer;
}

    .nivel-opcion input {
        position: absolute;
        opacity: 0;
        width: 1px;
        height: 1px;
    }

    .nivel-opcion > span {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 60px;
        padding: 10px 12px;
        border: 1.5px solid #CFCFCA;
        border-radius: 10px;
        background: #fff;
        height: 100%;
    }

    .nivel-opcion small {
        color: #6B6B66;
        font-size: 12px;
        line-height: 1.25;
    }

    .nivel-opcion input:focus-visible + span {
        outline: 3px solid var(--oroplag-dorado);
        outline-offset: 2px;
    }

    .nivel-opcion[data-nivel="nulo"] input:checked + span {
        border-color: #55554F;
        background: #EFEFEC;
    }

    .nivel-opcion[data-nivel="baja"] input:checked + span {
        border-color: var(--oroplag-verde);
        background: #E3EFE7;
    }

    .nivel-opcion[data-nivel="media"] input:checked + span {
        border-color: #B8860B;
        background: #FBF0CF;
    }

    .nivel-opcion[data-nivel="alta"] input:checked + span {
        border-color: #9A2B1C;
        background: #F8DEDA;
    }

/* ---------- Lista de clientes con buscador ---------- */
.cliente-lista {
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #E3E3E0;
    border-radius: 10px;
}

.cliente-opcion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #EFEFEC;
    cursor: pointer;
}

    .cliente-opcion[hidden] {
        display: none;
    }

    .cliente-opcion input {
        width: 20px;
        height: 20px;
        accent-color: var(--oroplag-verde);
        flex-shrink: 0;
    }

    .cliente-opcion:has(input:checked) {
        background: #E3EFE7;
    }

.cliente-texto {
    display: block;
    font-size: 15px;
}

.cliente-detalle {
    display: block;
    font-size: 12px;
    color: #6B6B66;
}

.cliente-vacio {
    padding: 14px;
    margin: 0;
    color: #6B6B66;
    font-size: 14px;
}

/* ---------- Firmas ---------- */
.firma-lienzo {
    position: relative;
    border: 1.5px dashed #BDBDB6;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

    .firma-lienzo canvas {
        display: block;
        width: 100%;
        height: 170px;
        touch-action: none; /* que el dedo firme en lugar de mover la página */
    }

.firma-guia {
    position: absolute;
    left: 14px;
    bottom: 10px;
    color: #A9A9A2;
    font-size: 13px;
    pointer-events: none;
}

.firma.firmado .firma-guia {
    display: none;
}

.firma-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #55554F;
    margin-top: 6px;
    padding-top: 4px;
}

.firma-nombre {
    font-size: 14px;
    color: var(--oroplag-texto);
}

/* ---------- Errores de grupo ---------- */
.error-grupo {
    color: #B02A1A;
    font-size: 14px;
    margin: 6px 0 0;
}

.campo-faltante .chip span,
.campo-faltante .nivel-opcion > span,
.campo-faltante .cliente-lista,
.campo-faltante .firma-lienzo {
    border-color: #B02A1A;
}

/* ================= Reporte: renglones de "Productos aplicados" (Sprint 3) =================
   Agregar al FINAL de wwwroot/css/site.css, después del bloque del formulario del reporte. */

.producto-renglon {
    border: 1px solid #E3E3E0;
    border-left: 4px solid var(--oroplag-dorado);
    border-radius: 10px;
    padding: 10px 12px 12px;
    margin-bottom: 10px;
    background: #FCFCFA;
}

.producto-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.producto-numero {
    font-weight: bold;
    color: var(--oroplag-verde);
    font-size: 14px;
}

.reporte-sublabel {
    display: block;
    font-size: 13px;
    color: #55554F;
    margin: 6px 0 4px;
}

.reporte-seccion .form-select {
    font-size: 16px;
    min-height: 46px;
}

.chips-compactos {
    margin-top: 10px;
}

    .chips-compactos .chip span {
        min-height: 40px;
        padding: 6px 14px;
    }

.producto-datos {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

@media (max-width: 400px) {
    .producto-datos {
        grid-template-columns: 1fr 1fr;
    }

        .producto-datos > div:first-child {
            grid-column: 1 / -1;
        }
}

.producto-errores {
    color: #B02A1A;
    font-size: 14px;
    padding-left: 18px;
    margin-bottom: 10px;
}

/* ================= Reporte: fotos de evidencia y detalle del servicio (Sprint 3) =================
   Agregar al FINAL de wwwroot/css/site.css, después del bloque de "Productos aplicados". */

.fotos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

    .fotos-grid:empty {
        display: none;
    }

.foto-miniatura {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #EFEFEC;
}

    .foto-miniatura img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* solo en la miniatura; la foto guardada va completa */
        display: block;
    }

.foto-quitar {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

    .foto-quitar:focus-visible {
        outline: 3px solid var(--oroplag-dorado);
        outline-offset: 1px;
    }

.fotos-acciones {
    display: flex;
    gap: 8px;
}

    .fotos-acciones[hidden] {
        display: none;
    }

.fotos-boton {
    position: relative;
    flex: 1;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .fotos-boton:focus-within {
        outline: 3px solid var(--oroplag-dorado);
        outline-offset: 2px;
    }

/* Oculto a la vista pero no con display:none, para que el label lo abra también en iPhone */
.fotos-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ---------- Lista "Mis servicios": cada fila abre el detalle ---------- */
.tecnico-fila-enlace {
    display: block;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
}

    .tecnico-fila-enlace:hover {
        background: #F7F7F5;
        color: inherit;
    }

.tecnico-fila:has(.tecnico-fila-enlace) {
    padding: 0;
}

/* ---------- Detalle del servicio ---------- */
.detalle-datos {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 15px;
}

    .detalle-datos dt {
        color: #6B6B66;
        font-weight: normal;
    }

    .detalle-datos dd {
        margin: 0;
    }

.detalle-fotos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

    .detalle-fotos a {
        display: block;
        border-radius: 8px;
        overflow: hidden;
        background: #EFEFEC;
    }

    .detalle-fotos img {
        width: 100%;
        height: auto;
        display: block;
    }

.detalle-firmas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

    .detalle-firmas img {
        width: 100%;
        height: auto;
        border: 1px solid #E3E3E0;
        border-radius: 8px;
        background: #fff;
    }

    .detalle-firmas figcaption {
        font-size: 13px;
        color: #6B6B66;
        margin-top: 4px;
    }

@media (max-width: 400px) {
    .detalle-datos {
        grid-template-columns: 1fr;
    }

        .detalle-datos dd {
            margin-bottom: 6px;
        }
}
/* ================= Espacio para el banner de Somee =================
   El plan gratuito de Somee pone un anuncio fijo abajo que tapaba los botones
   "Nuevo reporte" y "Guardar reporte". Si algún día se pasa a un hosting sin
   banner, basta con cambiar este valor a 0px. */
:root {
    --espacio-banner-hosting: 64px;
}

.tecnico-accion-fija {
    bottom: var(--espacio-banner-hosting);
}

.tecnico-main {
    padding-bottom: calc(110px + var(--espacio-banner-hosting));
}
/* ================= Detalle del servicio: botones para mandar el reporte (Sprint 3) =================
   Agregar al FINAL de wwwroot/css/site.css. */
.detalle-acciones {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.detalle-accion {
    flex: 1;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: bold;
}

@media (max-width: 360px) {
    .detalle-acciones {
        flex-direction: column;
    }
}

/* ================= Chips: no cambian de ancho al marcarlos =================
   La palomita siempre ocupa su lugar (invisible si no está marcada), así al
   marcar una opción no crece ni empuja a las demás al siguiente renglón. */
.chip span::before {
    content: "✓";
    margin-right: 6px;
    font-weight: bold;
    visibility: hidden;
}

.chip input:checked + span::before {
    visibility: visible;
}