* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
}

.contenedor-principal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.oculto {
    display: none !important;
}

.encabezado-modulo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.titulo-principal {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.subtitulo-descripcion {
    color: #6b7280;
    font-size: 1rem;
}

.boton-primario {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.938rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.boton-primario:hover {
    background-color: #1d4ed8;
}

.boton-secundario {
    background-color: white;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.938rem;
    transition: background-color 0.2s;
}

.boton-secundario:hover {
    background-color: #f9fafb;
}

.contenedor-filtros {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.grupo-filtros {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.campo-busqueda-wrapper {
    flex: 1;
    position: relative;
}

.icono-busqueda {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 20px;
    height: 20px;
}

.campo-busqueda {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.938rem;
    outline: none;
    transition: all 0.2s;
}

.campo-busqueda:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.selector-filtro {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.938rem;
    outline: none;
    cursor: pointer;
    background-color: white;
}

.contador-resultados {
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.contenedor-tabla {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.tabla-despachos {
    width: 100%;
    border-collapse: collapse;
}

.tabla-despachos thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tabla-despachos th {
    text-align: left;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.tabla-despachos th:last-child {
    text-align: right;
}

.tabla-despachos tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

.tabla-despachos tbody tr:nth-child(even) {
    background-color: rgba(249, 250, 251, 0.5);
}

.tabla-despachos tbody tr:hover {
    background-color: #f9fafb;
}

.tabla-despachos td {
    padding: 1rem 1.5rem;
    font-size: 0.938rem;
}

.celda-nombre {
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.celda-nombre:hover {
    color: #2563eb;
}

.celda-identificador {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #6b7280;
}

.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.badge-activo {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.badge-suspendido {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.boton-acciones {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.5rem;
    color: #6b7280;
    transition: background-color 0.15s;
}

.boton-acciones:hover {
    background-color: #f3f4f6;
}

.contenedor-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.numero-pagina {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.938rem;
}

.numero-pagina.activo {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb-link:hover {
    color: #111827;
}

.contenedor-formulario {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.tarjeta-formulario {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.titulo-seccion {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
}

.grupo-campo {
    margin-bottom: 1.5rem;
}

.etiqueta-campo {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.campo-obligatorio {
    color: #ef4444;
}

.campo-entrada {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.938rem;
    outline: none;
    transition: all 0.2s;
}

.campo-entrada:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.texto-ayuda {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.tarjeta-preview {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.titulo-preview {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.icono-preview {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.item-preview {
    margin-bottom: 1rem;
}

.label-preview {
    font-size: 0.875rem;
    color: #6b7280;
    display: block;
    margin-bottom: 0.25rem;
}

.valor-preview {
    font-weight: 500;
    color: #111827;
}

.icono-svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .contenedor-formulario {
        grid-template-columns: 1fr;
    }

    .grupo-filtros {
        flex-direction: column;
    }
}

.contenedor-principal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.oculto {
    display: none !important;
}

.encabezado-modulo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.titulo-principal {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.subtitulo-descripcion {
    color: #6b7280;
    font-size: 1rem;
}

.boton-primario {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.938rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.boton-primario:hover {
    background-color: #1d4ed8;
}

.boton-secundario {
    background-color: white;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.938rem;
    transition: background-color 0.2s;
}

.boton-secundario:hover {
    background-color: #f9fafb;
}

.contenedor-filtros {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.grupo-filtros {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.campo-busqueda-wrapper {
    flex: 1;
    position: relative;
}

.icono-busqueda {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 20px;
    height: 20px;
}

.campo-busqueda {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.938rem;
    outline: none;
    transition: all 0.2s;
}

.campo-busqueda:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.selector-filtro {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.938rem;
    outline: none;
    cursor: pointer;
    background-color: white;
}

.contador-resultados {
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.contenedor-tabla {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.tabla-despachos {
    width: 100%;
    border-collapse: collapse;
}

.tabla-despachos thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tabla-despachos th {
    text-align: left;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.tabla-despachos th:last-child {
    text-align: right;
}

.tabla-despachos tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

.tabla-despachos tbody tr:nth-child(even) {
    background-color: rgba(249, 250, 251, 0.5);
}

.tabla-despachos tbody tr:hover {
    background-color: #f9fafb;
}

.tabla-despachos td {
    padding: 1rem 1.5rem;
    font-size: 0.938rem;
}

.celda-nombre {
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.celda-nombre:hover {
    color: #2563eb;
}

.celda-identificador {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #6b7280;
}

.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.badge-activo {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.badge-suspendido {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.boton-acciones {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.5rem;
    color: #6b7280;
    transition: background-color 0.15s;
}

.boton-acciones:hover {
    background-color: #f3f4f6;
}

.contenedor-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.numero-pagina {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.938rem;
}

.numero-pagina.activo {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb-link:hover {
    color: #111827;
}

.contenedor-formulario {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.tarjeta-formulario {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.titulo-seccion {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
}

.grupo-campo {
    margin-bottom: 1.5rem;
}

.etiqueta-campo {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.campo-obligatorio {
    color: #ef4444;
}

.campo-entrada {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.938rem;
    outline: none;
    transition: all 0.2s;
}

.campo-entrada:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.texto-ayuda {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.tarjeta-preview {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.titulo-preview {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.icono-preview {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.item-preview {
    margin-bottom: 1rem;
}

.label-preview {
    font-size: 0.875rem;
    color: #6b7280;
    display: block;
    margin-bottom: 0.25rem;
}

.valor-preview {
    font-weight: 500;
    color: #111827;
}

.icono-svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .contenedor-formulario {
        grid-template-columns: 1fr;
    }

    .grupo-filtros {
        flex-direction: column;
    }
}