:root {
    /* Colores de La Rana Express */
    --primary: #107c04;
    --secondary: #126B48
    --primary-light: #79C934;
    --accent: #FDB913;

    /* Superficies y textos */
    --background: #F7FAF5;
    --surface: #FFFFFF;
    --text: #202923;
    --text-muted: #647067;
    --border: #E1E9DE;

    /* Estados */
    --hover-bg: #EDF7E8;
    --focus-ring: rgba(121, 201, 52, 0.35);

    /* Bordes y sombras */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --shadow-modal: 0 8px 20px rgba(0, 0, 0, 0.20);
}


/* =========================================
   BOTÓN CONSULTA DE ENCOMIENDA
========================================= */

.boton-consulta {
    display: inline-block;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background-color: transparent;
    border: 2px solid var(--primary);
    border-radius: 30px;
    text-align: center;
    text-decoration: none;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                transform 0.2s ease;
}

.boton-consulta:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--surface);
}

.boton-consulta:active {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--text);
    transform: translateY(2px);
}

.boton-consulta:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}


/* =========================================
   MODAL DE SEGUIMIENTO
========================================= */

.seguimiento-modal {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    margin: auto;
    width: calc(100% - 30px);
    max-width: 1190px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.seguimiento-oculto {
    display: none !important;
}

.seguimiento-contenedor {
    width: 100%;
    max-width: 1190px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--surface);
    box-shadow: var(--shadow-modal);
}


/* =========================================
   COLUMNAS DEL MODAL
========================================= */

.seguimiento-izq {
    width: 40%;
    background-color: var(--primary);
    color: var(--surface);
    text-align: center;
    padding: 10px;
}

.seguimiento-icono {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--accent);
}

.seguimiento-der {
    width: 60%;
    background-color: var(--surface);
    color: var(--text);
    padding: 25px 20px;
    min-height: 300px;
    font-size: 14px;
}


/* =========================================
   ENCABEZADO DEL SEGUIMIENTO
========================================= */

.seguimiento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.seguimiento-titulo {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary);
}

.seguimiento-cerrar {
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.seguimiento-cerrar:hover {
    color: var(--primary);
}


/* =========================================
   FORMULARIO DE SEGUIMIENTO
========================================= */

.seguimiento-formulario {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.seguimiento-formulario input,
.seguimiento-formulario select {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.seguimiento-formulario input:focus,
.seguimiento-formulario select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.seguimiento-formulario button {
    padding: 10px 20px;
    background-color: var(--primary);
    color: var(--surface);
    border: none;
    border-radius: var(--radius-md);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.seguimiento-formulario button:hover {
    background-color: var(--primary-light);
    color: var(--text);
}

.seguimiento-formulario button:active {
    transform: translateY(1px);
}


/* =========================================
   RESULTADOS Y TABLAS
========================================= */

.seguimiento-resultados {
    background-color: var(--background);
    color: var(--text);
    padding: 10px;
    border-radius: var(--radius-md);
}

.seguimiento-tabla {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.tabla-contenedor {
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    margin-top: 15px;
}

.tabla-consulta {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1100px;
}

.tabla-consulta th,
.tabla-consulta td {
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.tabla-consulta thead th {
    position: sticky;
    top: 0;
    background-color: #3eab32;
    color: var(--surface);
    font-weight: 600;
    font-size: 14px;
    z-index: 1;
}

.tabla-consulta tbody tr:nth-child(even) {
    background-color: var(--background);
}

.tabla-consulta tbody tr:hover {
    background-color: var(--hover-bg);
}


/* =========================================
   BARRAS DE DESPLAZAMIENTO
========================================= */

.tabla-contenedor::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.tabla-contenedor::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 5px;
}

.tabla-contenedor::-webkit-scrollbar-track {
    background-color: var(--background);
}


/* =========================================
   ENCABEZADO SUPERIOR DEL MODAL
========================================= */

.seguimiento-header-top,
.seguimiento-encabezado-superior {
    text-align: center;
    background-color: #3eab32;
    padding: 15px 10px 8px;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.seguimiento-encabezado-superior {
    border-bottom: 3px solid var(--accent);
}

.seguimiento-img-superior {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.seguimiento-titulo-superior {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--surface);
}

.seguimiento-titulo-superior span {
    color: var(--accent);
    font-weight: 900;
}


/* =========================================
   CAMPOS DEL FORMULARIO POR DOCUMENTO
========================================= */

#formulario-documento > div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

#campo-documento-seguimiento {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {
    .seguimiento-modal {
        top: 75px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }

    .seguimiento-contenedor {
        flex-direction: column;
    }

    .seguimiento-izq,
    .seguimiento-der {
        width: 100%;
        box-sizing: border-box;
    }

    .seguimiento-der {
        padding: 20px 15px;
        min-height: auto;
    }

    #formulario-documento,
    #formulario-documento > div,
    #campo-documento-seguimiento {
        flex-direction: column;
        align-items: stretch;
    }

    #formulario-documento label,
    #seguimiento-tipo-documento,
    #campo-documento-seguimiento label,
    #campo-documento-seguimiento input,
    #formulario-documento button {
        width: 100%;
        box-sizing: border-box;
    }

    .seguimiento-titulo-superior {
        font-size: 19px;
    }

    .tabla-consulta {
        min-width: 900px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boton-consulta,
    .seguimiento-formulario button,
    .seguimiento-cerrar {
        transition: none;
    }
}
