* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

.inicio {
    width: 90%;
    max-width: 700px;
    margin: 120px auto;
    padding: 50px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.inicio h1 {
    margin-bottom: 15px;
}

.inicio p {
    margin-bottom: 30px;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #198754;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.btn:hover {
    background: #157347;
}

/* ==========================================
   VARIABLES DE COLOR
========================================== */

:root {
    --azul: #123c69;
    --azul-claro: #1d5d91;
    --rojo: #c62828;
    --rojo-hover: #a91f1f;
    --blanco: #ffffff;
    --gris-fondo: #f4f6f9;
    --gris-borde: #d9dee5;
    --gris-texto: #606975;
}


/* ==========================================
   GENERAL
========================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--gris-fondo);
    color: #222;
}


/* ==========================================
   CONTENEDOR PRINCIPAL
========================================== */

.inicio {
    width: 92%;
    max-width: 1000px;
    margin: 50px auto;
    padding: 35px;
    background: var(--blanco);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}


/* ==========================================
   TITULOS
========================================== */

.inicio h1 {
    color: var(--azul);
    margin-bottom: 10px;
}

.inicio h2 {
    color: var(--azul);
    border-left: 5px solid var(--rojo);
    padding-left: 12px;
    margin-top: 30px;
}


/* ==========================================
   TEXTO
========================================== */

.inicio p {
    color: var(--gris-texto);
}


/* ==========================================
   SECCION UNSPSC
========================================== */

.seccion-unspsc {
    margin-top: 30px;
    padding: 25px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    background: #fafbfc;
}


/* ==========================================
   BLOQUES DE SELECT
========================================== */

.seccion-unspsc > div:not([id]) {
    margin-top: 20px;
}

.seccion-unspsc label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    color: var(--azul);
}

.seccion-unspsc select {
    width: calc(100% - 105px);
    padding: 11px 12px;
    border: 1px solid var(--gris-borde);
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.seccion-unspsc select:focus {
    outline: none;
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 2px rgba(29, 93, 145, 0.12);
}


/* ==========================================
   SELECTS BUSCABLES (Tom Select)
   El combo con buscador debe verse igual
   que el select nativo que reemplaza
   ========================================== */

.seccion-unspsc .ts-wrapper {
    width: calc(100% - 105px);
    display: inline-block;
    vertical-align: middle;
    text-align: left;
}

.seccion-unspsc .ts-wrapper .ts-control {
    padding: 11px 12px;
    border: 1px solid var(--gris-borde);
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-height: auto;
    text-align: left;
}

.seccion-unspsc .ts-wrapper .ts-control input {
    font-size: 14px;
}

/* El placeholder ("Seleccione un segmento")
   en gris, como el texto del select nativo */

.seccion-unspsc .ts-wrapper .ts-control input::placeholder {
    color: #757575;
    opacity: 1;
}

/* Borde azul al enfocar, igual que el select */

.seccion-unspsc .ts-wrapper.focus .ts-control {
    outline: none;
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 2px rgba(29, 93, 145, 0.12);
}

/* Deshabilitado, igual que select:disabled */

.seccion-unspsc .ts-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* La lista desplegable: texto a la izquierda
   como el select nativo y por encima de todo */

.seccion-unspsc .ts-dropdown {
    font-size: 14px;
    border: 1px solid var(--gris-borde);
    border-radius: 6px;
    z-index: 100;
    text-align: left;
}

.seccion-unspsc .ts-dropdown .option {
    text-align: left;
    padding: 8px 12px;
}

/* Opción resaltada: azul suave tipo select
   nativo (no el bloque azul oscuro) */

.seccion-unspsc .ts-dropdown .active {
    background: #e8f0f7;
    color: var(--azul);
}


/* ==========================================
   BOTONES AGREGAR
========================================== */

.seccion-unspsc button {
    border: none;
    padding: 11px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}


/* Botones de agregar */

#btnAgregarSegmento,
#btnAgregarFamilia,
#btnAgregarClase,
#btnAgregarProducto {
    background: var(--azul);
    color: white;
}

#btnAgregarSegmento:hover,
#btnAgregarFamilia:hover,
#btnAgregarClase:hover,
#btnAgregarProducto:hover {
    background: var(--azul-claro);
}


/* ==========================================
   BOTONES DESHABILITADOS
========================================== */

button:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ==========================================
   LISTAS DE ELEMENTOS AGREGADOS
========================================== */

#listaSegmentos,
#listaFamilias,
#listaClases,
#listaProductos {
    margin-top: 10px;
}


/* ==========================================
   ELEMENTO AGREGADO
========================================== */

.elemento-agregado {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 14px;
    margin-top: 8px;

    background: white;

    border: 1px solid var(--gris-borde);
    border-left: 4px solid var(--azul);

    border-radius: 6px;
}


/* Texto */

.elemento-texto {
    color: #333;
    font-size: 14px;
}


/* ==========================================
   BOTON ELIMINAR
========================================== */

.btn-eliminar {
    background: var(--rojo);
    color: white;

    border: none;
    padding: 7px 12px;

    border-radius: 5px;

    cursor: pointer;
}

.btn-eliminar:hover {
    background: var(--rojo-hover);
}


/* ==========================================
   BOTON PRINCIPAL
========================================== */

.btn {
    display: inline-block;

    padding: 12px 25px;

    background: var(--azul);
    color: white;

    text-decoration: none;

    border: none;
    border-radius: 6px;

    cursor: pointer;

    font-weight: bold;
}

.btn:hover {
    background: var(--azul-claro);
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 700px) {

    .inicio {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .seccion-unspsc select {
        width: 100%;
        margin-bottom: 8px;
    }

    .seccion-unspsc .ts-wrapper {
        width: 100%;
        margin-bottom: 8px;
    }

    .seccion-unspsc button {
        width: 100%;
    }

}

/* ==========================================
   DESCRIPCIÓN DEL PROCESO
   ========================================== */

.seccion-descripcion {
    margin-top: 25px;
    padding: 20px 35px;
    border-top: 1px solid #dfe5ec;
}

.seccion-descripcion h3 {
    color: #143f73;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
}

.grupo-descripcion {
    display: flex;
    gap: 10px;
    width: 100%;
}

.grupo-descripcion input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #ccd5df;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.grupo-descripcion input:focus {
    border-color: #143f73;
    box-shadow: 0 0 0 2px rgba(20, 63, 115, 0.1);
}

.grupo-descripcion button {
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 6px;
    background: #143f73;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.grupo-descripcion button:hover {
    background: #0d315b;
}


/* ==========================================
   DESCRIPCIONES AGREGADAS
   ========================================== */

#listaDescripciones {
    margin-top: 12px;
}

#listaDescripciones .elemento-agregado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #f5f8fb;
    border: 1px solid #dfe5ec;
    border-left: 4px solid #d62828;
    border-radius: 6px;
}

#listaDescripciones .elemento-texto {
    color: #333;
    font-size: 14px;
    word-break: break-word;
}

#listaDescripciones .btn-eliminar {
    flex-shrink: 0;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    background: #d62828;
    color: white;
    font-size: 13px;
    cursor: pointer;
}

#listaDescripciones .btn-eliminar:hover {
    background: #b71c1c;
}

/* ==========================================
   PANEL ADMINISTRATIVO
   ========================================== */

.panel-admin {
    width: 92%;
    max-width: 1400px;
    margin: 40px auto;
}

.admin-header {
    background: #111827;
    color: white;
    padding: 30px;
    border-radius: 14px;
    margin-bottom: 25px;
}

.admin-header h1 {
    margin: 0 0 8px;
}

.admin-header p {
    margin: 0;
    color: #d1d5db;
}


/* ==========================================
   RESUMEN
   ========================================== */

.admin-resumen {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
    margin-bottom: 30px;
}

.tarjeta-resumen {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow:
        0 4px 15px rgba(0,0,0,.08);

    border-left: 5px solid #2563eb;
}

.tarjeta-resumen span {
    display: block;
    color: #6b7280;
    margin-bottom: 8px;
}

.tarjeta-resumen strong {
    font-size: 30px;
}

.tarjeta-resumen.pendiente {
    border-left-color: #f59e0b;
}

.tarjeta-resumen.activo {
    border-left-color: #16a34a;
}

.tarjeta-resumen.bloqueado {
    border-left-color: #dc2626;
}


/* ==========================================
   CLIENTES
   ========================================== */

.admin-clientes {
    background: white;
    padding: 25px;
    border-radius: 14px;

    box-shadow:
        0 4px 15px rgba(0,0,0,.08);
}

.clientes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clientes-header h2 {
    margin: 0;
}

.clientes-header button,
.admin-footer button,
.btn-ver {
    border: none;
    border-radius: 7px;
    padding: 9px 15px;
    cursor: pointer;
    font-weight: 600;
}


/* ==========================================
   TABLA
   ========================================== */

.tabla-contenedor { 
    width: 100%;
    overflow-x: auto;
}

.admin-clientes table {
    width: 100%;
    border-collapse: collapse;
}

.admin-clientes th {
    background: #111827;
    color: white;
    padding: 13px;
    text-align: left;
}

.admin-clientes td {
    padding: 13px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-clientes tr:hover {
    background: #f9fafb;
}


/* ==========================================
   ESTADOS
   ========================================== */

.estado {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.estado-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.estado-activo {
    background: #dcfce7;
    color: #166534;
}

.estado-bloqueado {
    background: #fee2e2;
    color: #991b1b;
}


/* ==========================================
   BOTÓN VER
   ========================================== */

.btn-ver {
    background: #2563eb;
    color: white;
}

.btn-ver:hover {
    background: #1d4ed8;
}


/* ==========================================
   PANEL DE EMPRESA — SUPER ADMIN
   (botón dar/quitar, en el detalle del
   cliente)
   ========================================== */

.dato-rol {
    grid-column: 1 / -1;
}

.acciones-rol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.acciones-rol button {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    transition: transform .18s, box-shadow .18s;
}

.acciones-rol button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 13px rgba(6,43,89,.18);
}


/* ==========================================
   MENSAJES
   ========================================== */

.mensaje-admin {
    margin-bottom: 15px;
    color: #6b7280;
}


/* ==========================================
   FOOTER
   ========================================== */

.admin-footer {
    margin-top: 25px;
}

.admin-footer button {
    background: #374151;
    color: white;
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {

    .admin-resumen {
        grid-template-columns:
            repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .admin-resumen {
        grid-template-columns: 1fr;
    }

    .panel-admin {
        width: 95%;
        margin: 20px auto;
    }

}


/* ==========================================
   DETALLE DEL CLIENTE
   ========================================== */

.detalle-cliente {
    margin-bottom: 25px;
}

/* Mismo estilo de título que las secciones de
   filtros: mayúsculas con rayita de color.
   Solo en el detalle: el listado usa otra cosa. */
.detalle-cliente .clientes-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--secopio-navy);

    font-size: 15px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.detalle-cliente .clientes-header h2::before {
    content: "";

    width: 4px;
    height: 20px;

    background: var(--secopio-blue);

    border-radius: 4px;
}


/* ==========================================
   DATOS DEL CLIENTE
   ========================================== */

.datos-cliente {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(255px, 1fr));

    gap: 14px;
}

.dato-cliente {
    background: white;

    border: 1px solid #e2e8f0;

    border-left: 3px solid var(--secopio-teal);

    padding: 13px 16px;

    border-radius: 11px;

    box-shadow: 0 1px 3px rgba(6,43,89,.05);

    transition:
        box-shadow .18s,
        transform .18s,
        border-color .18s;
}

.dato-cliente:hover {
    transform: translateY(-2px);

    border-color: #cfe3ee;

    border-left-color: var(--secopio-blue);

    box-shadow: 0 6px 14px rgba(6,43,89,.10);
}

/* Etiqueta: pequeña, mayúscula y discreta */
.dato-cliente span {
    display: block;

    color: #8296ab;

    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;

    margin-bottom: 6px;
}

/* Valor: lo que de verdad se lee */
.dato-cliente strong {
    display: block;

    color: var(--secopio-ink);

    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;

    /* los correos largos no deben desbordar */
    overflow-wrap: anywhere;
}

/* Empresa y correo: los dos datos que
   identifican al cliente, con más peso */
.dato-identidad {
    grid-column: span 2;

    background: var(--secopio-soft);

    border-color: #d5e9f3;

    border-left-color: var(--secopio-navy);
}

.dato-identidad strong {
    color: var(--secopio-navy);
    font-size: 16px;
    font-weight: 700;
}

/* Las insignias de estado viven dentro del
   <strong>: no deben heredar el formato
   de bloque de las etiquetas */
.dato-cliente strong .estado {
    text-transform: none;
    letter-spacing: 0;
    font-size: 12.5px;
}

/* Estado en rojo cuando ya venció */
.estado-vencido {
    background: #fee2e2;
    color: #991b1b;
}


/* ==========================================
   FILTROS
   ========================================== */

.detalle-filtros {
    background: white;

    padding: 25px;

    border-radius: 14px;

    margin-bottom: 25px;

    border: 1px solid #e2e8f0;

    box-shadow:
        0 4px 15px rgba(6,43,89,.06);
}

.detalle-filtros h2 {
    margin-top: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--secopio-navy);

    font-size: 15px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

//* Barra de color a la izquierda del título */
.detalle-filtros h2::before {
    content: "";

    width: 4px;
    height: 20px;

    background: var(--secopio-blue);

    border-radius: 4px;
}

/* Título ausente: sin barra ni espacio */
.detalle-filtros h2:empty {
    display: none;
}


/* ==========================================
   GRID
   ========================================== */

.grid-filtros {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    align-items: start;

    gap: 16px;
}


/* ==========================================
   TARJETAS
   ========================================== */

.tarjeta-filtro {
    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    overflow: hidden;
}

.tarjeta-filtro h3 {
    background: var(--secopio-soft);

    color: var(--secopio-navy);

    margin: 0;

    padding: 11px 15px;

    border-bottom: 1px solid #dbeafe;

    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}


/* ==========================================
   ELEMENTOS
   ========================================== */

.lista-detalle {
    padding: 6px;
}

/* Cada filtro es una fila limpia con separador,
   no una caja dentro de otra caja */
.elemento-detalle {
    display: flex;
    align-items: baseline;
    gap: 10px;

    padding: 8px 10px;

    border-radius: 8px;
}

.elemento-detalle:hover {
    background: #eef7fb;
}

.elemento-detalle + .elemento-detalle {
    border-top: 1px solid #e8eef5;
}

.elemento-detalle:last-child {
    margin-bottom: 0;
}

/* El código se alinea en columna y no se
   pega con el nombre */
.elemento-detalle strong {
    flex: 0 0 82px;

    color: var(--secopio-blue);

    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

.elemento-detalle span {
    flex: 1 1 auto;

    color: var(--secopio-ink);

    font-size: 13.5px;
    line-height: 1.45;
}


/* ==========================================
   DESCRIPCIONES
   ========================================== */

.lista-descripciones-detalle {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));

    gap: 10px;
}

.descripcion-detalle {
    background: var(--secopio-soft);

    color: var(--secopio-ink);

    border-left: 3px solid var(--secopio-teal);

    padding: 10px 14px;

    border-radius: 8px;

    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
}


/* ==========================================
   SIN ELEMENTOS
   ========================================== */

.sin-elementos {
    color: #94a3b8;

    padding: 12px 10px;

    margin: 0;

    font-size: 13px;
    font-style: italic;
}


/* ==========================================
   RESPONSIVE DETALLE
   ========================================== */

@media (max-width: 900px) {

    .datos-cliente {
        grid-template-columns:
            repeat(2, 1fr);
    }

}

@media (max-width: 700px) {

    /* con una sola columna, "span 2"
       desbordaría la rejilla */
    .dato-identidad {
        grid-column: auto;
    }

}

@media (max-width: 600px) {

    .datos-cliente,
    .grid-filtros {
        grid-template-columns: 1fr;
    }

}

/* ==========================================
   ACCIONES DE CUENTA
   ========================================== */

/* Los botones de Activar/Bloquear son el
   PRIMER hijo del grid de datos, así que sin
   esto se meterían en la primera celda y
   descuadrarían los 8 campos. Ocupan una
   fila propia encima. */
.acciones-cuenta {
    grid-column: 1 / -1;

    margin: 0 0 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Texto informativo en vez de botones
   (ej. el admin de empresa viendo su propia
   cuenta, que no puede bloquear) */
.nota-acciones {
    margin: 0;

    color: #64748b;

    font-size: 14px;

    font-style: italic;
}

/* ==========================================
   OCULTAR
   La clase .oculto la usa el JS para
   mostrar un solo boton a la vez (ej. "Dar
   panel de empresa" / "Deshabilitar panel de
   empresa") y para esconder el bloque de rol
   segun quien este mirando. Debe existir en
   ESTE css: antes solo estaba definida en
   configurar-filtros.css y panel-secopio.css,
   y el admin cargaba estilos.css, asi que los
   classList.add("oculto") no ocultaban nada y
   los dos botones salian siempre juntos.
   ========================================== */

.oculto {
    display: none !important;
}

.btn-activar,
.btn-bloquear {
    border: none;
    border-radius: 8px;

    padding: 11px 18px;

    color: white;

    font-weight: 600;

    cursor: pointer;
}

.btn-activar {
    background: #16a34a;
}

.btn-activar:hover {
    background: #15803d;
}

.btn-bloquear {
    background: #dc2626;
}

.btn-bloquear:hover {
    background: #b91c1c;
}


/* ==========================================
   REGISTRO EXITOSO / CUENTA EN VALIDACIÓN
   ========================================== */

.icono-reloj {
    width: 90px;
    height: 90px;

    margin: 0 auto 25px auto;

    border: 6px solid var(--azul);
    border-radius: 50%;

    position: relative;
}

/* Manecilla larga */

.icono-reloj::before {
    content: "";

    position: absolute;
    top: 14px;
    left: 50%;

    width: 5px;
    height: 28px;

    background: var(--azul);
    border-radius: 3px;

    transform: translateX(-50%);
    transform-origin: bottom center;
}

/* Manecilla corta */

.icono-reloj::after {
    content: "";

    position: absolute;
    top: 39px;
    left: 50%;

    width: 5px;
    height: 20px;

    background: var(--rojo);
    border-radius: 3px;

    transform-origin: top center;
    transform: rotate(130deg);
}


.mensaje-validacion {
    max-width: 480px;
    margin: 0 auto 30px auto;

    padding: 18px 22px;

    background: #f0f5fa;

    border: 1px solid var(--gris-borde);
    border-left: 5px solid var(--azul);
    border-radius: 8px;

    color: var(--gris-texto);
    line-height: 1.6;
}

.mensaje-validacion strong {
    color: var(--azul);
}


/* ==========================================
   SECCIÓN DE FILTROS (DESPLEGABLE)
   Se muestra cuando empresa, correo y
   password están llenos
   ========================================== */

.seccion-filtros {
    overflow: hidden;

    max-height: 7000px;
    opacity: 1;

    transition:
        max-height 0.7s ease,
        opacity 0.5s ease,
        transform 0.5s ease;

    transform: translateY(0);
}

.seccion-filtros.oculto {
    max-height: 0;
    opacity: 0;

    transform: translateY(-15px);

    pointer-events: none;
}


/* Inputs principales del registro */

#formRegistro > input {
    width: 100%;
    height: 45px;

    padding: 0 14px;
    margin-bottom: 12px;

    border: 1px solid var(--gris-borde);
    border-radius: 6px;

    font-size: 14px;

    outline: none;
}

#formRegistro > input:focus {
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 2px rgba(29, 93, 145, 0.12);
}

#formRegistro button[type="submit"] {
    width: 100%;
    height: 45px;

    border: none;
    border-radius: 6px;

    background: var(--azul);
    color: white;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;
}

#formRegistro button[type="submit"]:hover {
    background: var(--azul-claro);
}


/* Mensaje guía mientras faltan datos */

.mensaje-completa-datos {
    margin-top: 18px;

    color: var(--gris-texto);
    font-size: 14px;

    transition: opacity 0.4s ease;
}

.mensaje-completa-datos.oculto {
    opacity: 0;
}

/* ==========================================
   FILTRO POR PRECIO BASE
   ========================================== */

.seccion-precio {
    margin-top: 25px;
    padding: 20px 25px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    background: #fafbfc;
    text-align: left;
}

.seccion-precio h3 {
    color: var(--azul);
    font-size: 16px;
    margin: 0 0 12px 0;
}

.switch-sin-filtro {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gris-texto);
    cursor: pointer;
    margin-bottom: 14px;
}

.switch-sin-filtro input {
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.grupo-precio {
    display: flex;
    gap: 15px;
}

.grupo-precio > div {
    flex: 1;
}

.grupo-precio label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: bold;
    color: var(--azul);
}

.grupo-precio input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--gris-borde);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.grupo-precio input:focus {
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 2px rgba(29, 93, 145, 0.12);
}

.grupo-precio input:disabled {
    background: #eef1f5;
    cursor: not-allowed;
}


/* ==========================================
   LISTAS CON CHECKBOXES
   (departamento / modalidad / justificación)
   ========================================== */

.filtros-adicionales {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
    text-align: left;
}

.filtro-check {
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    background: #fafbfc;
    padding: 15px;
}

.filtro-check h3 {
    color: var(--azul);
    font-size: 15px;
    margin: 0 0 10px 0;
}

.buscador-check {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    margin-bottom: 8px;
    border: 1px solid var(--gris-borde);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.buscador-check:focus {
    border-color: var(--azul-claro);
}

.lista-check {
    max-height: 220px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--gris-borde);
    border-radius: 6px;
    padding: 6px;
}

.item-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 4px;
    font-size: 13px;
    color: #333;
    line-height: 1.35;
    cursor: pointer;
    border-radius: 4px;
}

.item-check:hover {
    background: #f0f5fa;
}

.item-check input {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.pie-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.contador-check {
    font-size: 12px;
    color: var(--gris-texto);
}

.btn-todos-check {
    background: none;
    border: none;
    padding: 0;
    color: var(--azul-claro);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.btn-todos-check:hover {
    text-decoration: underline;
}


/* ==========================================
   RESPONSIVE FILTROS ADICIONALES
   ========================================== */

@media (max-width: 800px) {

    .filtros-adicionales {
        grid-template-columns: 1fr;
    }

    .grupo-precio {
        flex-direction: column;
    }

}

/* Identidad visual SECOPIO: estilos visuales únicamente. */
:root {
    --secopio-navy: #062b59;
    --secopio-blue: #0787c9;
    --secopio-teal: #10a8b6;
    --secopio-green: #57b947;
    --secopio-ink: #18324d;
    --secopio-soft: #eef7fb;
}

body {
    background: radial-gradient(circle at 10% 0%, rgba(16,168,182,.12), transparent 30rem), linear-gradient(135deg, #f5fbfd 0%, #eef4f9 100%);
    color: var(--secopio-ink);
}

.inicio { margin: 54px auto; border: 1px solid rgba(7,135,201,.12); border-radius: 24px; box-shadow: 0 22px 60px rgba(6,43,89,.12); }
.marca-principal { margin: -8px auto 18px; text-align: center; }
.marca-principal img { display: block; width: min(100%, 410px); height: auto; margin: 0 auto; }
.inicio > h1 { color: var(--secopio-navy); letter-spacing: .04em; }
.inicio input, .inicio select, .inicio textarea { border: 1px solid #c9dce8; border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.inicio input:focus, .inicio select:focus, .inicio textarea:focus { border-color: var(--secopio-blue); box-shadow: 0 0 0 4px rgba(7,135,201,.12); }
.btn, button[type="submit"] { background: linear-gradient(135deg, var(--secopio-navy), var(--secopio-blue)); border-radius: 10px; }
.btn:hover, button[type="submit"]:hover { background: linear-gradient(135deg, #041e42, var(--secopio-teal)); }
.admin-header { background: linear-gradient(120deg, var(--secopio-navy), #087fb9 72%, var(--secopio-green)); border-radius: 22px; box-shadow: 0 18px 38px rgba(6,43,89,.18); }
.logo-header { width: 210px; max-width: 55vw; height: auto; display: block; margin-bottom: 18px; }
.admin-header h1 { letter-spacing: .02em; }
.admin-clientes, .tarjeta-resumen, .detalle-filtros { border-radius: 18px; border: 1px solid rgba(7,135,201,.10); }
.admin-clientes th { background: var(--secopio-navy); }
.admin-clientes tr:hover { background: var(--secopio-soft); }
.clientes-header button, .admin-footer button, .btn-ver { background: var(--secopio-blue); color: white; border-radius: 10px; }
.clientes-header button:hover, .admin-footer button:hover, .btn-ver:hover { background: var(--secopio-teal); }

/* Rediseño visual completo: componentes modernos sin cambios funcionales. */
html { scroll-behavior: smooth; }
body { font-family: "Segoe UI", Inter, Arial, sans-serif; min-height: 100vh; }

.inicio {
    overflow: hidden;
    max-width: 980px;
    padding: 48px clamp(22px, 5vw, 64px) 58px;
}
.inicio::before, .panel-admin::before {
    content: "";
    display: block;
    height: 5px;
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(90deg, var(--secopio-blue), var(--secopio-teal), var(--secopio-green));
}
.inicio::before { position: absolute; }
.inicio h1 { font-size: clamp(26px, 4vw, 36px); margin-top: 12px; }
.inicio > p { font-size: 15px; line-height: 1.7; }
.inicio form > input, .inicio form > textarea {
    display: block;
    width: 100%;
    height: 50px;
    margin: 13px 0;
    padding: 0 17px;
    background: #fbfdfe;
    color: var(--secopio-ink);
    font-size: 15px;
}
.inicio form > input::placeholder, .inicio input::placeholder { color: #8ca0af; }
.inicio form button[type="submit"] { min-width: 190px; min-height: 50px; margin-top: 18px; }

.seccion-filtros { animation: aparecer .45s ease both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.seccion-unspsc, .seccion-precio, .filtros-adicionales, .seccion-descripcion {
    border: 1px solid #dceaf1;
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 8px 25px rgba(6,43,89,.045);
}
.seccion-unspsc { padding: 28px; }
.seccion-unspsc h2, .seccion-precio h3, .filtro-check h3, .seccion-descripcion h3 {
    letter-spacing: .01em;
}
.seccion-unspsc h2 { border-left: 0; padding: 0 0 14px; border-bottom: 2px solid #e4f1f6; }
.seccion-unspsc > div:not([id]) { padding: 14px; border-radius: 12px; background: #f8fcfd; }
.seccion-unspsc .ts-wrapper .ts-control, .seccion-unspsc select { height: 48px; border-radius: 10px; background: #fff; }
.seccion-unspsc button, .grupo-descripcion button, .btn-todos-check {
    min-height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secopio-navy), var(--secopio-blue));
    color: #fff;
    box-shadow: 0 5px 12px rgba(6,43,89,.15);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.seccion-unspsc button:hover, .grupo-descripcion button:hover, .btn-todos-check:hover,
.btn:hover, button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(6,43,89,.22); filter: saturate(1.12); }
.elemento-agregado { border: 1px solid #dceaf1; border-left: 4px solid var(--secopio-teal); border-radius: 10px; box-shadow: 0 3px 10px rgba(6,43,89,.05); }
.seccion-precio, .filtros-adicionales, .seccion-descripcion { margin-top: 24px; padding: 26px; }
.filtro-check { border: 1px solid #dceaf1; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(6,43,89,.05); }
.filtro-check h3 { padding: 17px 18px; margin: 0; background: linear-gradient(135deg,#f5fbfd,#fff); border-bottom: 1px solid #e5f0f4; border-radius: 14px 14px 0 0; }
.buscador-check { margin: 15px; width: calc(100% - 30px); border-radius: 9px; padding: 11px 13px; border: 1px solid #c9dce8; }
.lista-check { padding: 0 15px; }
.pie-check { padding: 13px 15px; border-top: 1px solid #e7f0f4; }
.btn-todos-check { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.grupo-descripcion input { border-radius: 10px; }

.panel-admin { position: relative; max-width: 1420px; padding-top: 10px; }
.admin-header { position: relative; padding: 34px clamp(24px, 4vw, 46px); overflow: hidden; }
.admin-header::after { content:""; position:absolute; width:280px; height:280px; border:35px solid rgba(255,255,255,.08); border-radius:50%; right:-80px; top:-130px; }
.admin-header h1 { font-size: clamp(25px, 4vw, 38px); position: relative; z-index:1; }
.admin-resumen { gap: 18px; }
.tarjeta-resumen { position:relative; overflow:hidden; padding:24px; transition: transform .2s, box-shadow .2s; }
.tarjeta-resumen:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(6,43,89,.13); }
.tarjeta-resumen::after { content:""; position:absolute; width:70px; height:70px; border-radius:50%; right:-20px; bottom:-25px; background:rgba(7,135,201,.08); }
.admin-clientes { padding: 28px; box-shadow: 0 12px 32px rgba(6,43,89,.08); }
.clientes-header { padding-bottom: 18px; border-bottom: 1px solid #e4eef3; }
.clientes-header h2, .detalle-filtros h2 { color: var(--secopio-navy); }
.admin-clientes table { font-size: 14px; }
.admin-clientes th { padding: 16px 14px; letter-spacing: .03em; font-size: 12px; text-transform: uppercase; }
.admin-clientes td { padding: 16px 14px; }
.admin-clientes tr:last-child td { border-bottom: 0; }
.admin-footer { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin-top:24px; }
.admin-footer button { min-height: 44px; padding: 11px 18px; transition: transform .18s, box-shadow .18s; }
.admin-footer button:hover { transform: translateY(-2px); box-shadow: 0 7px 15px rgba(6,43,89,.18); }
.mensaje-admin { border-radius: 10px; }

@media (max-width: 700px) {
    .inicio { margin: 20px auto; padding: 34px 16px 40px; }
    .seccion-unspsc, .seccion-precio, .filtros-adicionales, .seccion-descripcion { padding: 17px; }
    .grupo-descripcion { flex-direction: column; }
    .admin-clientes { padding: 15px; }
    .admin-header { padding: 27px 22px; }
    .logo-header { width: 175px; }
}
