* {
    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);
}


/* ==========================================
   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 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;
}


/* ==========================================
   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;
}


/* ==========================================
   DATOS DEL CLIENTE
   ========================================== */

.datos-cliente {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.dato-cliente {
    background: #f9fafb;
    border-left: 4px solid #2563eb;

    padding: 16px;

    border-radius: 8px;
}

.dato-cliente span {
    display: block;

    color: #6b7280;

    font-size: 13px;

    margin-bottom: 7px;
}

.dato-cliente strong {
    color: #111827;
}


/* ==========================================
   FILTROS
   ========================================== */

.detalle-filtros {
    background: white;

    padding: 25px;

    border-radius: 14px;

    margin-bottom: 25px;

    box-shadow:
        0 4px 15px rgba(0,0,0,.08);
}

.detalle-filtros h2 {
    margin-top: 0;
}


/* ==========================================
   GRID
   ========================================== */

.grid-filtros {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;
}


/* ==========================================
   TARJETAS
   ========================================== */

.tarjeta-filtro {
    background: #f9fafb;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    overflow: hidden;
}

.tarjeta-filtro h3 {
    background: #111827;

    color: white;

    margin: 0;

    padding: 14px 16px;

    font-size: 16px;
}


/* ==========================================
   ELEMENTOS
   ========================================== */

.lista-detalle {
    padding: 12px;
}

.elemento-detalle {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 7px;

    padding: 10px;

    margin-bottom: 8px;
}

.elemento-detalle:last-child {
    margin-bottom: 0;
}

.elemento-detalle strong {
    color: #2563eb;

    margin-right: 6px;
}

.elemento-detalle span {
    color: #374151;
}


/* ==========================================
   DESCRIPCIONES
   ========================================== */

.lista-descripciones-detalle {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.descripcion-detalle {
    background: #eff6ff;

    color: #1e3a8a;

    border-left: 4px solid #2563eb;

    padding: 12px 15px;

    border-radius: 7px;

    font-weight: 500;
}


/* ==========================================
   SIN ELEMENTOS
   ========================================== */

.sin-elementos {
    color: #6b7280;

    padding: 12px;

    margin: 0;

    font-size: 14px;
}


/* ==========================================
   RESPONSIVE DETALLE
   ========================================== */

@media (max-width: 900px) {

    .datos-cliente {
        grid-template-columns:
            repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .datos-cliente,
    .grid-filtros {
        grid-template-columns: 1fr;
    }

}

/* ==========================================
   ACCIONES DE CUENTA
   ========================================== */

.acciones-cuenta {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.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: 3000px;
    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;
}